c# - Viewing additional GridView columns on click with javascript? -


I am trying to figure out how to choose the row description in my gridview and see. Actually I have a gridview with 9 columns, but 6 is hidden when I click on one row, so I want to load those extra column values ​​in my JavaScript so that I put them in a separate table below Can I I think it is relatively simple but I do not understand anything and I was hoping that I can be told in the right direction.

If you need this then here is some code.

  & lt; ASP: Gridview id = "Biliability Weave" backendor = "white" runat = "server" autoconnect column = "fottal" csslLA = "TBL" & gt; & Lt; Columns & gt; & Lt; ASP: Baldfield Datafield = "Username" HeaderText = "User Name" /> & Lt; ASP: Baldfield Datafield = "User ID" HeaderText = "User ID" /> & Lt; ASP: Baldfield Datafield = "HRSTLB" Headtext = "Billable Hours" / & gt; & Lt; ASP: Baldfield Datafield = "HRSTLNB" Headtext = "NonBillable Hours" /> & Lt; ASP: Baldfield Datafield = "HRSTL" Headtext = "Total Hours" /> & Lt; ASP: Baldfield Datafield = "HRSXP" Headtext = "Expected Hours" /> & Lt; ASP: Boundfield Datafield = "Bailibility" Headtext = "Biliability" /> & Lt; / Column & gt; & Lt; / ASP: GridView & gt;    

In a way, however, using post-back, on-pick Use indexed-changed events. This will give you information about the row in the callback and you can process any required data and reboot it again.

To do this without a postback, add a button or anything in the column collection in a quick and dirty way. Use the onclick event to pass whatever information you need for a JavaScript method. Since you are using the database, you must & lt;% Eval ('FieldName')% & gt; Where the name of the field is a column in your datalet to pass the data of your function. Another option is to add the html and javascript to the rows to use the RowDataBound function.

Comments