Hello,
I have a question about the ultragrid. Is it possible to define the grid on one of it's 10.000 properties somewhere so it acts like the following example
As example i have this class
Currently
This has a drawback that i can't filter or sort on the grid when i have for example 3000 persons. Ofcourse i can create a new object and convert 1 object into the other object.. but that's a workaround, i don't want to redefine it every time. Just because i want to filter or sort on a specific adres.
Greetings
The BindingManager considers an object to be a list if it implements IList or IBindingList.
So if you want to bind the grid such that the root level rows are Person objects, then you need to bind the grid to a List of people. I recommend using the BindingList<Person> type.
In order for the child rows to work, the Person class would have to return a List of Adresses, not an array. It would also have to be returned as a Public Property, not just a member. If you are using VS2005 or higher, I recommend changing the type of the Adresses to BindingList<Adres>.
nono, this is just an example class (not the actual one, that one is working without any problems)
I just want to be able to search and sort in the child rows on the root level without showing the columns
The grid doesn't have any search functionality. You can sort by setting the SortIndicator property on the column header.
Ok i guess it isn't possible on the grid then and i will have to do it in the underlaying businessentity, dataset or whatever
Thanks for the information
I'm afraid I still do not understand what you are asking. I can clearly see in the screen shot here that you have filter rows displayed in both the parent band and the child band. I do not see any parent rows here that have multiple child bands.
ArcodenOuden said:I wan't to filter on the child bands
I wan't to filter on the child bands
You can filter child bands using the ColumnFilters collection of the band, or the user could type into the filter row.
ArcodenOuden said: or else i want each main band expanded & duplicated whenever there are 2 child bands under 1 main band.
or else i want each main band expanded & duplicated whenever there are 2 child bands under 1 main band.
I don't understand this statement. I don't see any rows here that have sibling bands. But if there were rows with 2 child bands under them, then there is no way the grid can duplicate the parent row to show one child band under each. This would have to be done by the data source, not the grid.
PS: I didn't get an usefull answer yet (but the topic is marked as answer?)
As example an test grid with test data.
Each main band (customers) has 1 or 2 child bands (adresses)
I wan't to filter on the child bands or else i want each main band expanded & duplicated whenever there are 2 child bands under 1 main band.
Maybe an unbound column in the main band?
I don't understand what you mean. SortIndicator is on the column, not the band. And it is available on any column on any band, it makes no difference if it's a child band or the root band.
The same is true for filtering. You can use ColumnFilters to filter on any band.