Hello,
Please help me,
I want to create grid view dynamically it is possible in asp.net with vb?
In my grid empId, Name and checkbox?
Checkbob is dynamic not fixed.
monthwise checkbox is increment or decrement.
I have refer some site like this
http://www.codedigest.com/Articles/ASPNET/168_Create_Dynamic_GridView_Control_in_C_ASPNet.aspx
Unable to cast object of type 'DynamicGridViewTextTemplate' to type 'System.Web.UI.ITemplate'.
this errors are give. I have create same code.
Thanks In Advance,
Loading
Jitendra PatelPosted Mar 9, 2011, 1:42 AM
My problem is not solved.
I have convert all c# code into vb.net.
below my code
Dim tf As New TemplateField
For iCntCol = 1 To intdays
tf.HeaderTemplate = New GridViewTemplate(ListItemType.Header, iRecord)
tf.ItemTemplate = New GridViewTemplate(ListItemType.Item, "chk" + Convert.ToString(iCntCol))
grvEmpAttendance.Columns.Add(tf)
iRecord = iRecord + 1
Next
GridviewTemplate class is same my aspx.vb page then this errors occurs.
Unable to cast object of type 'GridViewTemplate' to type 'System.Web.UI.ITemplate'.
Please help me,
I have lost my time to solved this problem.
I have reffer this link code
http://www.codeproject.com/KB/aspnet/create_template_columns.aspx
Thanks In Advance.
Suthish NairPosted Mar 7, 2011, 2:57 PM
Suthish NairPosted Mar 7, 2011, 10:13 AM