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.
Hi, I am new to ggc and have a few questions. I have dataset/datatable as a data source to the ggc. 1. When a user click on a row, how can I tell which row/column it is and how to retrieve the underlying record in the datatable?
2. One of the data is an custom object that I would normally use tag property of treeview or datagrid to store it. How would I store that type of information in the ggc. (In other word, each row of the ggc control is referring to a custom object.)
3. If the underlying data in the table get changed, how do I let the ggc knows - which properties or event do I need to subscribe/set? Similary, if the user change data on the grid, how to I save it back to the table / data source.
>>> 2. One of the data is an custom object that I would normally use tag property of treeview or datagrid to store it. How would I store that type of information in the ggc. (In other word, each row of the ggc control is referring to a custom object.)
Try setting the Style.CellValueType property of the cell in a grid to store the type information of the custom object.
//set the cell type information using TableControlPrepareViewStyleInfo event of the grid. e.Inner.Style.CellValueType = typeof(YourType);
>>> 3. If the underlying data in the table get changed, how do I let the ggc knows - which properties or event do I need to subscribe/set? Similary, if the user change data on the grid, how to I save it back to the table / data source.
The following events are used to detect the underlying datasource changes in a grid.
1) SourceListRecordChanged event - occured when a record in the underlying datasource are added/delted/changed. 2) SourceListListChanged event - gives the more details about the SourceListRecordChanged event.
Try calling the Table.EndEdit() method to update the changes in a grid to underlying datasource.