soniyakapoor03
March 6th, 2006, 11:27 PM
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.
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.