Monday, 2 September 2013

Enable 1st row & disable rest of the rows in gridview

Enable 1st row & disable rest of the rows in gridview

Im working on asp.net with c#. I have a gridview with templatefield
columns, data comes from sql database. I have link on the item template.
Where initially only first row of the gridview should be enable, rest of
the rows should be disable(all the rows should be visible),
My project is on booking beds for patients,where each room has 4 beds.
Patient No1,Patient No2,Patient No3,Patient No4 are my gridview 4 rows
with proper details of room, i should book Patient No1 first, and that
time rest of the rows like Patient No2,Patient No3,Patient No4 shouldn't
allow me click(book), when Patient No1 is booked then Patient No2 should
be allow to book and other rows like Patient No3, Patient No4 shouldn't
allow me to click(book) so on...
My problem is how can i enable the row & disable rest of the rows when the
action is completed.
Coding written for gridview
<asp:TemplateField HeaderText="View Details">
<ItemTemplate>
<a href='Application.aspx?BedNo=<%# Eval("Pat_ID") %>'>
View </a>
</ItemTemplate>
</asp:TemplateField>
Plz help me..

No comments:

Post a Comment