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 use a GridDataBoundGrid and i'm trying to get the datatype of the active column (the column with the selected cell). How can i do that? I used the code below, but it doesn't seem to work because it always returns System.Int32 (while most columns contain text information).
Console.WriteLine(_grid.CurrentCell.GetType());
or
_grid.GetCol(_grid.CurrentCell.ColIndex).GetType();
Thanks in advance.
ADAdministrator Syncfusion Team September 16, 2003 09:16 AM UTC
If you have not explicitly added GridBoundColumns, then you could use code like:
int field = _grid.Binder.ColIndexToField(_grid.CurrentCell.ColIndex);
Type t = _grid.Binder.InternalColumns[field].StyleInfo.CellValueType;
If you have added GridBoundColumns, then you would use _grid.GridBoundColumns instead of _grid.Binder.InternalColumns.
RKRichard KettelerijSeptember 17, 2003 03:29 AM UTC
It didn't exactly did the trick, but thanks anyway