Special Row in Grid
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
Hello! If have grid for edit settings for providers, 1 row for each provider, there is a template with 2 textbox, but I have one provider that need another number of settings, how I can change the controls in template in runtime, after databind?
Change the column to a template column. Put two panels in the template. On the OnRowDataBound protected void gridRowBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { // Updatae Items if (e.Row.RowType == DataControlRowType.DataRow) { PanelA = (Panel) e.Row.FindControl("PanelA"); PanelB = (Panel)e.Row.FindControl("PanelB"); //Put your logic to display the panel based on the data item } }
I didn't get any requirements for the signature