|
-
March 7th, 2006, 12:27 AM
#1
checkbox in datagrid
hi friends,
I new to .net.
please help.
i had a datagrid in c# asp.net.
in this datagrid i had a check box.
when i click on the check box,
i want to get the row id of the checked row.
is there any method in .net.
my code is like this
this.grdRoles.ItemCommand+=new DataGridCommandEventHandler(grdRoles_ItemCommand);
private void grdRoles_ItemCommand(object source, DataGridCommandEventArgs e)
{
int UID=Convert.ToInt32(drpUserName.SelectedItem.Value);
int RoleId = Convert.ToInt32((grdRoles.DataKeys[e.Item.ItemIndex]));
AdminSection objAdmin=new AdminSection();
objAdmin.AssignUserRoles(UID,RoleId);
}
but it is not entering int this code this code.
please help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|