Missing GroupCaption in SfDataGrid
Hi,
I've the problem, that my SfDataGrid displays groups as defined in GroupColumnDescriptions, but without any Text when the SfDataGrid is within a TabItem.
If the same SfDataGrid is moved outside the TabControl the group captions are displayed correctly, but not in the TabControl.
I wanted to prepare a simple sample. But there I'm not able to reproduce the problem. So where is the reason for this behavior?
Please find the two attached screenshots (one with correct and one without group caption)
Regards
Harald
SIGN IN To post a reply.
5 Replies
JG
Jai Ganesh S
Syncfusion Team
November 28, 2016 11:54 AM UTC
Hi Harald,
We have checked your reported issue in our sample but we also not replicate the issue.
Also, we didn’t find any screnshots for this issue as you mentioned your query. Could you please share more details like whether you have used any styles in your application also if possible can you please share the xaml and class files to replicate the issue. This would be more helpful for us to analyze further.
Regards,
Jai Ganesh S
HB
Harald Betzler
November 29, 2016 09:47 AM UTC
Hi Jai,
Attachment: SfGridSample7_8833f38a.zip
I discovered two reasons.
1. A style of the surrounding TabItem sets Foreground="White" and Background="Red", which results to a GroupColumnDesciption with White-On-White. Ok, that's not really an issue. But, why is foreground inherited and not background?
2. The GroupColumnDescription is empty (really empty and not White-On-White), when in AutoGeneratingColumns event the generating of the grouped column is cancelled. The result is the same, if you configure ShowColumnWhenGrouped to True or False.
Ok, you can say a not-generated-column should not be grouped. But it works. You can group by a not-generated-column, but without a GroupColumnDescription. In my opinion there should be a valid GroupColumnDescription, if a valid grouping is displayed.
I've attached a sample, where you can see the behavior.
Regards
Harald
Attachment: SfGridSample7_8833f38a.zip
JG
Jai Ganesh S
Syncfusion Team
November 30, 2016 12:16 PM UTC
Hi Harald,
You can achieve your requirement to show the GroupColumnDescription by hiding the column in AutoGeneratingColumn event like below,
|
private void SampleDataGrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnArgs e)
{
if (e.Column.MappingName == "ItemType")
{
e.Column.IsHidden = true;
}
} |
Regards,
Jai Ganesh S
HB
Harald Betzler
December 7, 2016 06:14 PM UTC
Hi Jai,
that works perfectly. Thank you.
Regards
Harald
JG
Jai Ganesh S
Syncfusion Team
December 8, 2016 04:34 AM UTC
Hi Harald,
Thank you for the update.
Please let us know if you need further assistance in this.
Regards,
Jai Ganesh S
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
HB Harald Betzler
- Nov 27, 2016 06:52 PM UTC
- Dec 8, 2016 04:34 AM UTC