Hello,
I am new at Telerik RadGrid in Ajax/ASP .NET.
I am trying to allow the user of my application to be able to re order the columns of my RadGrid. I found on your website that :
GridDragDropColumn has to be inserted in the Columns collection of a GridTableView, But as my RadGrid columns are autogenerated, I have no <Column> tag in the description of my RadGrid. So I am trying to understand where should the GridDragDropColumn tag be inserted to allow Columns drag and drop (and re-ordering).
I tried to insert it in the <Columns> description of
my MasterTableView (see the code below) but when running it, I cannot drag any of my columns ?
Another point is that I want that my columns can also be sorted by one click on the header of the column. Is that compatible with the GridDragDropColumn option ?
Thank your for your help.
Here is the code of my grid in my ASPX file :
<telerik:RadGrid ID=
"GridView1"
runat=
"server"
ActiveItemStyle-BorderStyle=
"Solid"
AllowSorting=
"True"
AllowMultiRowSelection=
"True"
AllowFilteringByColumn=
"True"
TableLayout=
"Fixed"
ValidationSettings-EnableValidation=
"False"
ScrollHeight=
"200px"
Height=
"700px"
Width =
"98%"
table-layout=
"auto"
>
<MasterTableView TableLayout=
"auto"
>
<Columns>
<telerik:GridDragDropColumn HeaderStyle-Width=
"18px"
/>
</Columns>
<NestedViewTemplate>
<asp:Panel runat=
"server"
ID=
"configControlContainer"
CssClass=
"viewWrap"
Visible=
"true"
BackColor=
"PaleGoldenrod"
>
<table>
<tr>
<td><telerik:RadTextBox ID=
"RadTextbox1"
runat=
"server"
>
</telerik:RadTextBox>
</td>
</tr>
<tr>
<td><telerik:RadButton ID=
"RadButton1"
Text=
"Confirm"
runat=
"server"
OnClick=
"btn_Click"
>
</telerik:RadButton>
</td>
</tr>
</table>
</asp:Panel>
</NestedViewTemplate>
<DetailTables>
</DetailTables>
</MasterTableView>
<ClientSettings AllowRowsDragDrop=
"true"
>
<Selecting AllowRowSelect=
"True"
EnableDragToSelectRows=
"false"
/>
<Scrolling AllowScroll=
"True"
ScrollHeight=
"475px"
UseStaticHeaders=
"true"
FrozenColumnsCount=
"1"
SaveScrollPosition=
"True"
/>
</ClientSettings>
</telerik:RadGrid>