This is a migrated thread and some comments may be shown as answers.

ColumnUniqueName after Column ReOrder

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 23 Jun 2011, 09:25 PM

I'm trying to loop through all selected rows via with the code below and it works fine until I ReOrder the columns. 
At that point, it returns the value in the column to the right of  it.  No matter how many times I reorder it, it always returns the value to the right. 

Code Behind:

For Each gdi As GridDataItem In rgTimeMaterial.SelectedItems
    jn = gdi("Customer").Text
Next

 

Asp.Net:

 

<t:RadGrid ID="rgTimeMaterial" runat="server" PageSize="200" AllowPaging="True" AllowSorting="True"
 AllowMultiRowSelection="true" Width="995" Height="412px" GridLines="Both" ShowFooter="true">
 <HeaderStyle Width="100" Wrap="false" />
 MasterTableView EnableHeaderContextMenu="true" CellPadding="0" CellSpacing="0" AllowMultiColumnSorting="true"
 Width="100%" ClientDataKeyNames="Job_Number">
 <CommandItemSettings ExportToPdfText="Export to Pdf" />
 <Columns>
 <t:GridClientSelectColumn HeaderStyle-Width="35" UniqueName="ClientSelectColumn" />
 </Columns>
 MasterTableView>
<ItemStyle Font-Names="Arial,Helvetica,sans-serif" Font-Size="9pt" Wrap="false" />
<ClientSettings ColumnsReorderMethod="Reorder" AllowColumnsReorder="True" AllowColumnHide="true"
ReorderColumnsOnClient="True">
<ClientEvents OnRowContextMenu="RowContextMenu" OnRowDblClick="OnRowDblClick" OnRowCreated="RadGrid1_RowCreated"
OnRowSelected="RadGrid1_RowSelected" OnRowDeselected="RadGrid1_RowDeselected"
OnGridCreated="GridCreated" />
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
<Scrolling SaveScrollPosition="true" AllowScroll="true" UseStaticHeaders="True">
</Scrolling>
<Resizing AllowColumnResize="true" EnableRealTimeResize="true" ShowRowIndicatorColumn="true"
ClipCellContentOnResize="true" AllowResizeToFit="true" />
</ClientSettings>
<PagerStyle Position="Top" Mode="NextPrevAndNumeric" AlwaysVisible="true" />
</t:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 28 Jun 2011, 12:49 PM
Hello James,

In which server-side event is the pasted server code used?
Does it work if you reorder columns on the server, by setting the ReorderColumnsOnClient to false?

Best wishes,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or