I am using a pair of Syncfusion GridListControls matched with their own Syncfusion ComboBoxBase. They are both based on the same data table. Users can choose by name in one and item number in the other. I''d like name to be first column in one and the number the first column in the other. I also want to see the number in the second column after the name and the name in the second column after the number. So hiding columns won''t solve the requirement.
Is there a way to change the order or mapping of the columns in a GridListControl without using separate queries?
ADAdministrator Syncfusion Team February 20, 2004 03:59 PM
You would have to handle the embedded gridcontrol''s QueryCellInfo on one of your gridlistcontrols to swap the column order.
Here is a sample.
GSGreg ShometteFebruary 23, 2004 09:16 AM
Thanks for your response. This doesn''t work in our case because both of our GridListControls have the same ValueMember. We hide that column from view. We also want the two to be connected so that when one is changed the other changes to the same record. That works now because they are both bound to the same datatable. But the order of the columns is the same in both lists.
Is there a way to change the order of the columns without changing the ValueMember?
ADAdministrator Syncfusion Team February 23, 2004 09:53 AM
Using QueryCellInfo to reorder columns in a GridListControl does not rely on any particular id column. Here is the sample modified to have an hidden id column plus 2 extra columns with the the two dropdowns showing only the 2 extra columns swapped.
If you want both comoboxes to remain in sync (change in one, changes the other), then you have to make sure the two gridlistcontrols use the same bindingcontext.
GSGreg ShometteFebruary 23, 2004 02:32 PM
Thanks, Clay. I should have picked that up from the first example.
I''m still having problems, though. I''m using VB.Net and maybe I''m not translating it properly from C#. I am using a gridlistcontrol as you do in your example, but I can''t find a querycellinfo event or property. We are using version 2
ADAdministrator Syncfusion Team February 23, 2004 03:11 PM
QueryCellInfo is an event in GridListControl.Grid (not in GridListControl). Here is a VB project.