c# - How to makes this checkbox works inside the GridView? -


I am a new ASP.NET developer and try to use a grid view control to manage employees in every division I am doing This will show all the employees in the employee table in the Gridware database. Now, I am experiencing the following problem:

FYI, I have the following database design:

  Employee table: Username, Name, JobTitle, Badgeo, Iactive , Division Code Division Table: SapCode, DivisionShortcut   

(IsActive is like a flag (bit datatype) to indicate whether the employee is in an assignment or not )

Isational will be displayed in GridView as a checkbox . If this investigation has been done, this is true and the employee is present in his division. If this is not checked, then this means that the employee is not with the partition, and it should be hidden from the gridview how to do it? Also, how do I do this (hidden) text that is visible in addition to the checkbox in editing mode?

ASP.NET code:

  & asp: TemplateField HeaderText = "active?" & Gt; & Lt; ItemTemplate & gt; & Lt;% # Eval ("Ishq")%> & Lt; / ItemTemplate & gt; & Lt; EditItemTemplate & gt; & Lt; ASP: checkbox id = "IActive" runat = "server" text = '& lt;% # bind ("iActive")%> / & Gt; & Lt; / EditItemTemplate & gt; & Lt; / ASP: TemplateField & gt;  Update:   

I want to hide the employee from GridView with all of its information as it is inactive.

try it

  & asp: checkbox id = "iActive" Runat = "server" visible = '& lt;% # bind ("ective")% & gt; Text = '& lt;% # bind ("active")% & gt; / & Gt;    

Comments