Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
UltraComboEditor is slow
posted

I have a grid with a column's editorControl property set to an UltraComboEditor. This UltraComboEditor is on the form with visible =false.

I have 2 view of grid.

In first view this column "Global" whose EditorControl is UltracomboEditor has somevalue and thus no problem.

In 2nd view this column "Global" whose EditorCotnrol is UltraComboEditor has no value coming from database hence for everrow the value of this cell is DBNull.Value. The UltraComboBox contains 23000 items. All Strings.

Problem: In 2nd view when i scroll or mouse hover on this column(Global) or cell. My CPU performce goes 100% and screen starts hanginng up. I have figured it out that when from the database the value of this colums's cell is DBNULL then it is hanging otherwise in first view there is some string passing as default value from the back end.

Please be in mind i want to use this control due to AutoComplete feauture. I can't use dropdown or ultracombo. I have to live with it. But i am surprise why it is happening when i scroll the grid or hover mouse on That particular column's cell.

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    You are probably using DataValue and DisplayText on each item in your ValueList. This means that every time the cell paints, the grid has to examine the value of the cell, find the matching value on the list, and then find the corresponding DisplayText for that item to display in the grid cell.

    This is usually no problem, the grid searches the list once and caches the index of the item on the list so it can easily find it on multiple paints. However, if the item is not on the list, as I suspect is the case here, then the grid has to search the entire list every time the cell paints.

    So one easy solution would be to put a DBNull item on your list so the grid finds it more easily.

    Also, what version of the controls are you using? I'm pretty sure that we made some optimizations to account for situations like this, so you may just need to get the latest Hot Fix or update to a newer version of the controls to fix this delay.

    Also, this has nothing to do with the issue, but why are you using an EditorControl? If you want to provide a dropdown list in a cell, it would be more efficient to use a ValueList rather than an editor. HOWTO:What is the best way to place a DropDown list in a grid cell?

Children