C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Re: How can I get the order after user moved column header?

rated by 0 users
This post has 0 Replies | 0 Followers

Top 10 Contributor
Posts 1,237
C1_PatrickS Posted: Mon, May 4 2009 10:01 AM
Hi,
 
Please discard the previous post, it was related to C1WebGrid for ASP.Net.
We can get the desired behavior in C1DataGrid for WPF.
 
BEGIN CODE

Private Sub btnIndexCount_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnIndexCount.Click

Dim i As Integer = 0

For i = 0 To Me.Grid.Columns.Count - 1

System.Diagnostics.Debug.WriteLine("Caption = " + Me.Grid.Columns(i).Caption + " New Index = " + Me.Grid.Columns.IndexOf(CType(Me.Grid.Columns(i), C1.WPF.C1DataGrid.Column)))

Next

End Sub

END CODE

Hope this helps.

Regards,

Patrick

 
 
 
"C1_PatrickS" <support@componentone.com> wrote in message news:...
<luokun> wrote in message news:217283@10.0.1.98...

User use mouse drag & drop column header,the column order has changed.

After this,when user click a button, in the button click event method,I want get the all column's new order(mean index),how can I do it?



http://helpcentral.componentone.com/cs/forums/p/79081/217283.aspx#217283

Page 1 of 1 (1 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.