Tuesday, 15 January 2013

c# - How to get boolean value from selectedrow in gridview ASP.NET -


How do I obtain a boolean value from the selected gridview row in ASP.NET, what do I do to get the normal string From Gridview and it works

  String name = GridViewsc event. Selected RAW Seals [9]. Text;  

When I try the same with boolean, it does not work, if someone knows how to do it or if there is any sign, please tell me, thank you!

Since you are using Gridview Boolean, they will generate a checkbox for you, so that you Boolean value can be obtained, something like this should be done:

  checkbox c = (checkbox) GridViewSwitch. Selected Row Fond Control ("Checkbox 1"); If (c.check == true) {// do something else} if (c. Check == wrong) {// do something}  

No comments:

Post a Comment