This is a migrated thread and some comments may be shown as answers.

Refresh problem with group headers (Grouping by ComboBoxColumn)

4 Answers 293 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rach
Top achievements
Rank 1
Rach asked on 19 May 2012, 12:14 PM
Hello,

We have found a very funny bug at RadGridView...

We created some grids with ComboBoxColumns, and we grouped the grids by this column by default (using the RadGridView properties).
When we run the project, the group headers appeared empty... but not all of them, only the ones at sight (the ones down the scroll bar do appeared), and playing around with the bug we also have seen that if we force the grid to refresh leaving outside a empty group header, the text appeared!!

For example:
- Move the scroll down, so the first group header is not visible at screen.
- Edit a cell.
- We move again up and there it is the header text :)

So after thinking about it, we have found a workaround, seeing that the problem was with labels "on screen" we collapsed the grid till it finished loading... and it worked! . Of course that is a very bad way to do it, and the effect is awfull, but for now it's only a prototype, so it's enough, but it would be better if that could be fixed.

4 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 22 May 2012, 09:30 AM
Hi Raquel,

Generally, the way RadComboBox (and consequently GridViewComboBoxColumn) works is that it searches for its selected item in the source only once and no matter if it finds it or not, it stops looking for it. So, in case the value is not available (not yet loaded), combo box will not display it. Could you verify whether all items from the source of the column are loaded before filling up the source ? Could you check whether you get the same behavior (empty value) if the grid is not grouped ? 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Rach
Top achievements
Rank 1
answered on 22 May 2012, 09:50 AM
The group headers are the only thing that is empty, the combobox value for each row appears correctly selected, so of course It doesn't happen when I don't group. I don't know exactly what to check if the itemssource are loaded, but I don't think that's the problem as far as the comboboxes load.

I have added 3 screens.
1 - Grid and groupDescriptors - That is the grid and the descriptors at Blend.
2 - EmptyHeaders - That is what appears when running the application: As seen the group headers text doesn't appear here.
3 - Not empty headers down the scroll - That shows how the headers outside the scroll do appear.

And also, as said before, If I close one empty header group, let it outside the screen moving the scroll, and edit any cell, when I move back the scroll the group header that was empty is visible.

So it seems like a refresh problem or something like that.
0
Maya
Telerik team
answered on 22 May 2012, 10:57 AM
Hi Raquel,

Could you try a couple of more things ? Could you define ColumnGroupDescriptor instead of GroupDescriptor ? Could you try grouping on other column - not only GridViewComboBoxColumn ? Do you still get the same behavior  ? Do you have any particular template for the group header ?

 
Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Rach
Top achievements
Rank 1
answered on 23 May 2012, 08:35 AM
Ok, I found a better solution while thinking of what was said about the item source loading. The group was created at design time, and the itemsSource assigment was at the Grid_Loaded event, I changed it to the class constructor and now it works better now. I think this is the correct way to do it, but it still was a very odd behaviour :)

Also, before realizing about that I tried to change to ColumnGroupDescriptor as proposed and I couldn't make it work, I'm not sure of what the diference between ColumnGroupDescriptor and GroupDescriptor.
Tags
GridView
Asked by
Rach
Top achievements
Rank 1
Answers by
Maya
Telerik team
Rach
Top achievements
Rank 1
Share this question
or