cancel
Showing results for 
Search instead for 
Did you mean: 

Sort functionality in Data Grid

Former Member
0 Kudos

Hi Gurus,

I am new to this DataGrid control.I want to establish the sort functionality when clicking on the headercolumns as in matrices.

(ie.When double clicking the header column , sort the data in ascending or descending order of that column) like in system form matrices.

How ever this is not possible when I tried with grid control.

The problem I am facing is that I cannot get the column headers of the grid programmatically.(in duble click event or itempressed event)

Anybody did this one previously? Also how

we can change the column order of the grid using screen painter?

The columns that actually come visible in the grid are actually columns of the linked datatable object.

In the designer ,there is no "swap" button for column re-ordering.

Only one way I know is changing the query associated with datatable.

This is a crucial thing ,since client may ask for re-ordering of columns frequently.

Can anybody help?

Regards,

Deepesh

Accepted Solutions (0)

Answers (1)

Answers (1)

barend_morkel2
Active Contributor
0 Kudos

Hi Deepesh,

1. This functionality is not available with the SDK. Thus it's not possible to change it on the fly. Your only option is to change the query associated with datatable (as you mentioned). You may set up a user preference table, that the user can configure with its preference. That's the best you can do.

2. To swap the columns in screen painter you must use SBO 2005 (it's not available on previous release). What you must do is, click on the one column you want to swap and the other you want to swap and click on the swap button (on the left bottom of the page in the columns tab)

Former Member
0 Kudos

Hi Barend,

I have a question related to the original question from Deepesh. this is what I want to accomplish:

When the user double clicks on the Header columns of the Grid control n my form, the SDK does not even recognize the double click.

Is there any way to catch the double click event on the

Grid column header?

Appreciate any help.

Thanks,

Gopal

barend_morkel2
Active Contributor
0 Kudos

Hi Gopal,

This is an issue with the SDK. The double click on the Header columns of the Grid is not exposed. So there is no way to catch the event.

Maybe we'll be lucky in the SBO2006 release...