am creating an itemtemplate all dynamic and adding text box ...i also looked to this link: http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html but the coding is too dense ..
please help me with my code
int colCnt = ds.Tables[0].Columns.Count;
int rowCnt = ds.Tables[0].Rows.Count;
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
RadGrid1.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = ds.Tables[0].Columns[0].ColumnName ;
boundColumn.HeaderText = ds.Tables[0].Columns[0].ColumnName;
GridTemplateColumn templateColumn;
for (int i = 1; i < colCnt; i++)
{
templateColumn = new GridTemplateColumn();
templateColumn . --> am clueless over here ....can u guyz me !
RadGrid1.MasterTableView.Columns.Add(templateColumn);
boundColumn.DataField = ds.Tables[0].Columns[i].ColumnName;
boundColumn.HeaderText = ds.Tables[0].Columns[i].ColumnName;
}
please help me with my code
int colCnt = ds.Tables[0].Columns.Count;
int rowCnt = ds.Tables[0].Rows.Count;
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
RadGrid1.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = ds.Tables[0].Columns[0].ColumnName ;
boundColumn.HeaderText = ds.Tables[0].Columns[0].ColumnName;
GridTemplateColumn templateColumn;
for (int i = 1; i < colCnt; i++)
{
templateColumn = new GridTemplateColumn();
templateColumn . --> am clueless over here ....can u guyz me !
RadGrid1.MasterTableView.Columns.Add(templateColumn);
boundColumn.DataField = ds.Tables[0].Columns[i].ColumnName;
boundColumn.HeaderText = ds.Tables[0].Columns[i].ColumnName;
}