Search code examples
c#exceljanusgridex

Getting all of the data inside GridEX



what I'm trying to do is export the selected rows to Excel.
But if I use the SelectedItems property it gives me a collection of the selected rows but in the order that they were selected.
I don't want this.
I want to get a collection of the selected rows as they appear in my table (however they are sorted).
Is there a way to do this?
Do i nedd to get all the data from my table and check each row if it's selected or not and then do what I need?

(it's part of a very large system and i just started working on this. i've never heard of this component before and i don't know all of it's properties and yes, i have looked on MSDN and in the definition)

Any help is appreciated
Cheers


Solution

  • I solved this problem using the Sort() function.

    GridEX.SelectedItems.Sort();