The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have read through a number of posts on this forum looking for help on what I need to do and have not found exactlt the information I'm looking for. What I'm trying to do is set a group's caption text based on the data that was used to populate the group. It seems the recommended way to override caption text with your own is to handle the QueryCellStyleInfo event, and change e.Style.Text to whatever you need. That's fine, but what I need to know is how I am supposed to get some identifying information about the group for whose caption I'm changing.
Right now I'm checking e.TableCellIdentity.TableCellType to see if it is a GridTableCellType.GroupCaptionCell. Once I've done that, I need to get to the data source used for that group (my data sources are custom object bindings to classes in my code). I've done this successfully in other places, such as when iterating SelectedRecords, by casting the return object from Record.GetData() to an object of the class used as its data source. But all my calls to GetData() from within QueryCellStyleInfo handler return null.
Here are some example classes to help illustrate what I'm trying to do. C# code is given and assume all classes own any members used in methods that aren't specifically listed.
Class Foo { public int SomeProperty { get { return 1; } } }
Class Bar { public string MyDescription { get { return "This is what I need access to"; } } public List MyItems { get { return mFooList; } } }
So my Grid Grouping Control uses an object binding to Bar objects as its data source. That table has a relation table that uses Foo object binding. So the table is organized into groups of Bar with rows of Foo. My QueryCellStyleInfo handler wants to override the caption for each group with the value of Bar.MyDescription.
Hopefully this makes sense and please let me know if you need clarification or more information from me.