Hai,
Welcome all, The web page using C#, have on datagrid. I bind data from sqlserver database successfully.I bound some datas from sqlserver successfully. Now I added one check box in itemtemplate tab. I need only one tick in one checkbox in datagrid, I dont want multiple selection, I need to prevent multiple selection in datagrid, If the client select any second checkbox, should show the error message like this " You can select only one item from datagrid" . Please help me?
Regards,
Manu.
Loading
hdk bhtPosted Mar 14, 2010, 3:25 AM
Try writing Javascript code which will disselect the other checkbox on selection of one checkbox..
This way user is mandatory to select only one checkbox.
Let me know if that helps.
Thanks
Sam HobbsPosted Mar 12, 2010, 11:00 PM
Manu RajPosted Mar 12, 2010, 10:03 AM
This is not enough. How can i set the event in checkbox, becauseit is in the gridview inner control. I need only only one check box selection at whole gridview? please help me?
Regards,
Manu,
Amit ChoudharyPosted Mar 12, 2010, 6:47 AM
another way of doing it is you can disable rest of the check boxes on CheckBox selection change event.
for (int i = 0; i < GridView1.Rows.Count; i++)
Please mark as answer if it helps you.