Hi ,
I have RadGrid created statically and i want to add more column at run-time .
i added but it not work after pagination.
if (!Page.IsPostBack)
{
int count=0;
foreach (var item in dbContext.STXWEB_EXTRA_COLUMNs.Where(extra=>extra.DLL_NAME==ReportName.Staff))
{
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
StaffReportGridID.MasterTableView.Columns.AddAt(2 + count, boundColumn);
boundColumn.DataField = item.COLUMN_HEADER;
boundColumn.HeaderText = item.COLUMN_HEADER;
// StaffReportGridID.MasterTableView.Columns.Add( boundColumn);
// StaffReportGridID.MasterTableView.Columns.AddAt(3 + count, boundColumn);
count++;
}
}
Please let me know is it possible thank u in advance.
thanks
I have RadGrid created statically and i want to add more column at run-time .
i added but it not work after pagination.
if (!Page.IsPostBack)
{
int count=0;
foreach (var item in dbContext.STXWEB_EXTRA_COLUMNs.Where(extra=>extra.DLL_NAME==ReportName.Staff))
{
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
StaffReportGridID.MasterTableView.Columns.AddAt(2 + count, boundColumn);
boundColumn.DataField = item.COLUMN_HEADER;
boundColumn.HeaderText = item.COLUMN_HEADER;
// StaffReportGridID.MasterTableView.Columns.Add( boundColumn);
// StaffReportGridID.MasterTableView.Columns.AddAt(3 + count, boundColumn);
count++;
}
}
Please let me know is it possible thank u in advance.
thanks