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
280
ID showing in group header instead of text, when having valuelist
posted

Hi there,

I have an UltraGrid where some columns display their contents with ValueLists.

Now I have the following problem:

When grouping by this column, the groupby header doesn't show the display text, but the data value. In my case it shows the ID instead of the name:
Shows: "<column header caption>: <data value> (nn items)"
I want: ""<column header caption>: <display text> (nn items)"

I think the reason is, that I don't have the same ValueLists in every cell of the column. This means, I generate and set the cell's ValueLists in the InitializeRow event.

However how can I force the grid to show the text?

Regards, Petra.

Parents
No Data
Reply
  • 370
    Suggested Answer
    posted

    Hi Petra,

    While going through the posted sample we found that you were trying to set the valueList on each cell. This means that a group could exist such that all the values in the cells are the same, but the text is different i.e. the same value could be translated into different text in each row by a different ValueLists. Since the text in each cell could vary, the grid doesn’t have any way to know which one to use and so the grid falls back to using the value.

    Hence, the behavior we see here in the sample is intentional and is correct.

    The ValueList on the column is taken into account by the grid before falling back to the value hence you may assign the valueList with all possible values for all rows to the column and then override the ValueList on each cell like the sample is currently doing. This will make sure that the text is picked up from the ValueList assigned to the column while you may still use the cells(with different valueLists) as you are currently doing.

    The other work around to fix this issue is to handle the InitializeGroupByRow event and change the description to the text you wish to show. You may get the text from the cell of the first child row in the group in this case, since the text in each cell will be the same. 

    Thanks

    Vaibhav

Children
No Data