I have a grid with 30'000 rows, 60 Columns. When I want to scroll horizontally the CPU (E6850 at 3GHz) goes up and the scrolling blocks for a few seconds. I intercept no events from the grid. Are there any settings to avoid this heavy CPU-Load?
There were a number of performance improvements made in 7.3; what version are you using? I just quickly created a DataTable with 60 columns and 30000 rows and my CPU usage never went past 30%, with the scrolling being pretty smooth. With this being said, things like transparancies and complex rendering will slow down your scrolling. Can you provide any additional information about your grid, or are you seeing this with the default settings?
-Matt
I use 8.1 and Vista and XP. In several columns I use UltraComboEditors as editorcontrols with 30'000 entries. The scrolling seems to stagnate when these columns come into view.
Manuel
UltraGridColumn col = mGrid.DisplayLayout.Bands[iBand].Columns[sCol];UltraComboEditor ed = new UltraComboEditor();EditorButton bt = new EditorButton();ed.ButtonsRight.Add(bt);ed.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;col.EditorControl = ed;ed.DataSource = table; // a DataTable with 30'000 entriesed.DisplayMember = table.Columns[1].ColumnName;ed.ValueMember = table.Columns[0].ColumnName;ed.BindingContext = mGrid.BindingContext;ed.DataBind();
So each new editor in at least one column is bound to a DataTable with 30,000 rows? Are these all bound to the same DataTable, including the grid? One solution that might would would be to turn off the SyncWithCurrencyManager of the grid to see if that speeds up anything. My guess as to what's happening is that when the grid needs to render the values in the columns with those large editors, it needs to look up the value in the list to pull out the appropriate DisplayMember and ValueMember, but I'm not entirely sure offhand.
No, there's no way to hide the default dropdown button in the UltraComo.You should Submit a feature request to Infragistics.
Regarding the button click, you should use the EditorButtonClick event on the control, not the Click event on the button.
Hi Mike,
Thanks for the hints. I've got the UltraCombo working, it is about 3 times faster.
Last points:
- Is there a way to hide the DropDown-Button (UltraComboEditor: DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never)?
- It seems that the Click-event of the button is not fired:
UltraCombo ed = new UltraCombo();EditorButton bt = new EditorButton();ed.ButtonsRight.Add(bt);bt.Click += new EditorButtonEventHandler(bt_Click);col.EditorControl = ed;
Hi Manuel,
If you need an editor button, then no, you can't use UltraDropDown or a ValueList. But you can use UltraCombo (not UltraComboEditor). UltraCombo (which is in the WinGrid assembly) supports EditorButtons and all the normal features of a ValueList and it's also got binary search functionality.
The needed behaviour of the cell is a bit more sophisticated because I need the look-up funtionality of a valuelist and an editbutton to display a search-mask (see thread ColumnStyle.EditButton with ValueList changed behaviour in V 8.2 ), I used the valuelist-methode until v7.1, witch stopped working with v8.2.
I'm not familiar with the UltraDropDown. Can I provide the same functionality as the UltraComboEditor (look-up, autocomplete, button)?
I'm not surprised this is a little slow. Every cell in the column with the UltraComboEditor has to search the list of 30,000 items every time it paints to find the matching item. It will cache the index of the item the first time it finds it, so it really only has to search once, but it's still quite a lot of linear searching.
This will be especially problematic if the grid cell contains a value that does not exist on the list, since this means that the search has to search every item on the list and cannot cache the index so the entire search has to repeat every time.
It's also possible that there are exceptions occurring during the search. This will happen sometimes if the data type of the grid column doesn't match up with the data type of the items in the list. Try setting the Visual Studio IDE to break on all run-time exceptions and see if any exceptions occur.
Whether exceptions occur or not, one thing I can recommend is that you do not use UltraComboEditor to provide your list. This is inefficient anyway, since the ComboEditor is a standalone control with an edit portion that is not being using by the grid. A ValueList would be a more efficient way to provide a simple dropdown list in the grid cell.
But an even better thing to use is the UltraDropDown control.This will not only alleviate the issue of an unused edit portion, the UltraDropDown also has a much more efficient way of searching the list - it uses a binary search by default. This means that there will be a slight performance hit the first time the dropdown is populated while it builds a sorted list of data, but it will be a lot more efficient during normal use.