Hi all,
I'd like to reorder my edit column to put it on the far right of my grid.
My radGrid is generated like this :
<MasterTableView>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ><ItemStyle CssClass="MyImageButton" width="20" /></telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>
Then I add up dynamically columns in the even NeedDataSource.
The problem is, My edit column is on the far left and not on the far right. I've tried the following snippet without much success :
protected void radGridTranslation_DataBound(object _sender, EventArgs _event)
{
GridColumnCollection l_columns = radGridTranslation.MasterTableView.Columns;
GridColumn l_editColumn = l_columns.FindByUniqueName("EditCommandColumn");
if (l_editColumn !=
{
l_editColumn.OrderIndex =
}
}
I've found this example :http://www.telerik.com/help/aspnet-ajax/grid-reordering-columns.html
But I don't want to have to use a script to change anything. I should be able to do it right in my Code behind.
Could you help me please ?
I'd like to reorder my edit column to put it on the far right of my grid.
My radGrid is generated like this :
<MasterTableView>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ><ItemStyle CssClass="MyImageButton" width="20" /></telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>
Then I add up dynamically columns in the even NeedDataSource.
The problem is, My edit column is on the far left and not on the far right. I've tried the following snippet without much success :
protected void radGridTranslation_DataBound(object _sender, EventArgs _event)
{
GridColumnCollection l_columns = radGridTranslation.MasterTableView.Columns;
GridColumn l_editColumn = l_columns.FindByUniqueName("EditCommandColumn");
if (l_editColumn !=
{
l_editColumn.OrderIndex =
}
}
I've found this example :http://www.telerik.com/help/aspnet-ajax/grid-reordering-columns.html
But I don't want to have to use a script to change anything. I should be able to do it right in my Code behind.
Could you help me please ?