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

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

rated by 0 users
This post has 1 Reply | 1 Follower

Not Ranked
Posts 3
luokun Posted: Fri, May 1 2009 12:18 AM

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?

Top 10 Contributor
Posts 1,237
Hi,
 
You can do this in the following way:
 
BEGIN CODE
 

protected void Button1_Click(object sender, EventArgs e)

{

for (int i = 1; i < this.C1WebGrid1.Columns.Count; i++)

{

    Response.Write("Column Index = " + this.C1WebGrid1.Columns[i].HeaderText.ToString() + "\n");

    Response.Write("Column Index = " + this.C1WebGrid1.Columns.IndexOf( (C1.Web.C1WebGrid.C1BaseColumn)this.C1WebGrid1.Columns[i])+ "\n");

}

}

END CODE
 
Hope this helps.
 
Regards,
Patrick
<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 (2 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.