Hi,
i have a radgrid with autogeneratedcolumns option as true. i disabled the viewstate for grid. whenever a column reorder happens, i have to move some more columns.i am trying to move the extra columns through server side implementation. i am doing this in Prerender event of radgrid. The drag and drop column is moving to dropped position. However i am unable to move the extra columns. please help me out regarding this. i am trying for this for whole day but in vain :(
i made the following settings for my grid
EnableColumnsViewState="true"
AllowColumnsReorder="True", ReorderColumnsOnClient="false"
grid PreRender code for moving the extra columns
protected void grdSummary_PreRender(object sender, EventArgs e)
{
//Holds the Unique names of columns to be moved
string[] extraColumns =new string(commasepratedColumnNames)
//column that was dragged and dropped
GridColumn mainColumnObject = grdSummary.MasterTableView.GetColumn("34");
index = mainColumnObject.OrderIndex;
foreach (string columnUniqueName in extraColumns)
{
grdSummary.MasterTableView.SwapColumns(columnUniqueName, mainColumnObject.UniqueName);
}
grdSummary.MasterTableView.Rebind();
}
Thanks,
Chaitanya
i have a radgrid with autogeneratedcolumns option as true. i disabled the viewstate for grid. whenever a column reorder happens, i have to move some more columns.i am trying to move the extra columns through server side implementation. i am doing this in Prerender event of radgrid. The drag and drop column is moving to dropped position. However i am unable to move the extra columns. please help me out regarding this. i am trying for this for whole day but in vain :(
i made the following settings for my grid
EnableColumnsViewState="true"
AllowColumnsReorder="True", ReorderColumnsOnClient="false"
grid PreRender code for moving the extra columns
protected void grdSummary_PreRender(object sender, EventArgs e)
{
//Holds the Unique names of columns to be moved
string[] extraColumns =new string(commasepratedColumnNames)
//column that was dragged and dropped
GridColumn mainColumnObject = grdSummary.MasterTableView.GetColumn("34");
index = mainColumnObject.OrderIndex;
foreach (string columnUniqueName in extraColumns)
{
grdSummary.MasterTableView.SwapColumns(columnUniqueName, mainColumnObject.UniqueName);
}
grdSummary.MasterTableView.Rebind();
}
Thanks,
Chaitanya