I'm having a problem with changing the headertext in my detailtable..
I'm creating multiple grids by a loop and show the underneath eachother..
Because the columns in my detailtable are variable, I didn't bound them..
So is there a way to change the headertext?
I'm creating multiple grids by a loop and show the underneath eachother..
Because the columns in my detailtable are variable, I didn't bound them..
So is there a way to change the headertext?
RadGrid[] GridName =
new
RadGrid[intTotalProcessTemplates];
for
(
int
i = 0; i < intTotalProcessTemplates; ++i)
{
// Create mastertable
GridName[i] =
new
RadGrid();
GridName[i].DataSource = GetDataTable(
"SELECT * FROM ProcessTemplate WHERE ProcessTemplate_id = "
+ (i + 1));
GridName[i].MasterTableView.DataKeyNames =
new
string
[] {
"ProcessTemplate_id"
};
GridName[i].Skin =
"Black"
;
GridName[i].AutoGenerateColumns =
false
;
GridName[i].AllowPaging =
true
;
// Columns create
GridName[i].MasterTableView.Columns.Add(CreateGridColumn(
"Process name"
,
"Name"
, 10.0));
GridName[i].MasterTableView.Columns.Add(CreateGridColumn(
"Process description"
,
"Description"
, 80.0));
GridName[i].MasterTableView.Columns.Add(CreateGridColumn(
"Parent"
,
"Parent"
, 10.0));
// Create detail table
GridTableView tableViewStartProcesses =
new
GridTableView(GridName[i]);
tableViewStartProcesses.DataKeyNames =
new
string
[] {
"Process_id"
};
tableViewStartProcesses.AutoGenerateColumns =
true
;
tableViewStartProcesses.AllowPaging =
true
;
tableViewStartProcesses.CommandItemDisplay = GridCommandItemDisplay.Top;
foreach
(GridColumn col
in
tableViewStartProcesses.RenderColumn)
{
if
(col.UniqueName ==
"templateid"
)
{
col.HeaderText =
"Template id"
;
}
}
// Fix result from stored proc: GetAllProcessesAndSteps_SP
LinqResult(tableViewStartProcesses, i);
// Add Details to table
GridName[i].MasterTableView.DetailTables.Add(tableViewStartProcesses);;
// Add to placeholder
this
.StartProcessPlaceHolder.Controls.Add(GridName[i]);