Table problem in vb.net1.1
-
I am placing the table into the edititemtemplate of DataGrid Control.I want to find the table in the codebehind file programically. i am placing in edititemtemplate as <edititemtemplate> <table id = "dynamic"> </table> </edititemtemplate> I am finding the table in the ItemDataBound function in this manner dim c as control=e.item.findcontrol("dynamic") But c comes out to be nothing Please help
-
I am placing the table into the edititemtemplate of DataGrid Control.I want to find the table in the codebehind file programically. i am placing in edititemtemplate as <edititemtemplate> <table id = "dynamic"> </table> </edititemtemplate> I am finding the table in the ItemDataBound function in this manner dim c as control=e.item.findcontrol("dynamic") But c comes out to be nothing Please help
-
I am placing the table into the edititemtemplate of DataGrid Control.I want to find the table in the codebehind file programically. i am placing in edititemtemplate as <edititemtemplate> <table id = "dynamic"> </table> </edititemtemplate> I am finding the table in the ItemDataBound function in this manner dim c as control=e.item.findcontrol("dynamic") But c comes out to be nothing Please help
I believe that you'll need to add the attribute
runat = "server"
to your table:... <edititemtemplate> <table id = "dynamic" runat = "server"> ...
That should allow you to useFindControl
to retrieve it. Hope that helps. :) --Jesse -
i think you need to make your table attribute runat=server in order to get it in code file Nav.
-
I believe that you'll need to add the attribute
runat = "server"
to your table:... <edititemtemplate> <table id = "dynamic" runat = "server"> ...
That should allow you to useFindControl
to retrieve it. Hope that helps. :) --Jesse -
I am placing the table into the edititemtemplate of DataGrid Control.I want to find the table in the codebehind file programically. i am placing in edititemtemplate as <edititemtemplate> <table id = "dynamic"> </table> </edititemtemplate> I am finding the table in the ItemDataBound function in this manner dim c as control=e.item.findcontrol("dynamic") But c comes out to be nothing Please help
Man try this thing dim c as control=e.item(index).findcontrol("dynamic") You should mention the index of the datagrid row. Do good and have good.
-
It will work Boss. Make sure your aspx page is in the format
ok
--------------------------------------- and you have properly binding data to Datagrid DataTable dt=new DataTable(); dt.Columns.Add(new DataColumn("One")); DataRow drow=dt.NewRow(); drow[0]="okman"; dt.Rows.Add(drow); DataGrid1.DataSource =dt; DataGrid1.DataBind(); -------------In item databound event write below if(e.Item.FindControl("tbl")!=null) { Response.Write("Found"); } It will write "Found"
-
Man try this thing dim c as control=e.item(index).findcontrol("dynamic") You should mention the index of the datagrid row. Do good and have good.