I am working on a screen which will handle viewing a certain entity. This entity is rather large. Say 45+ fields/properties.
The data of this entity is catagorized and we want to display its data per category. So i have created a tabbed environment in which each tab represents a certain catagory. Each tab contains a UltraGrid which will display its data (im actually showing x entity's at the same time).
Now what i want to do is load all the entity's from database once and then display a different subset of the data in each grid (tab). How can i go about doing this using the UltraDataSource?
Can i apply the same datasource to each ultragrid and specify which column it should or should not show? And would i do this on the ultradatasource level, or do i need to handle this on the grid level?
Any thoughts, suggestions?
Hi,
You could bind the grid directly to your data source and use the ColumnFilters in the grid to filter each grid such that only the rows with a particular category value are displayed.
I'm not sure why you would use the UltraDataSource here, though. If you already have the data on the client in some kind of data source like a DataTable, then there is really no reason for you to use the UltraDataSource. Unless you want to load the data on-demand.
You misunderstood, but then i wasn't to clear about that anyway.
I don't want to display different rows, but different columns, per tab.
The reason i am using a UltraDataSource is because thats how im getting the data supplied. Cant do much about that right now
I have already created a prototype which uses the ultragrid to show/hide various columns based on in which tab it is. This works pretty well actually.
Only thing is, i now have a ultragrid instance per tabpage. Im using the UltraTabControl and noticed something like Shared controls? I heavent looked into that yet, but if it allowes me to show the same grid instance on each tabpage, it might just be what im looking for.
You are correct. The SharedControls tab is for controls that you want to display on all tabs. So you could display a single grid on the SharedControls page and then just change the hidden columns in the grid in the SelectedTabChanged event.