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.
The c# sample from Datagrid question 5.20 displays an icon in the grid column based on the row number, ie., the Paint method taks a row number, one of many arguments, to index into the ImageList of icons...
(protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight)
I would like to use a value from one of the datagrid columns instead, to index into the ImageList. Can I get the column value from the Paint argument "...CurrencyManager source" and if so, how would I manipulate this argument to extract the column's value???
thx in advance
ADAdministrator Syncfusion Team April 27, 2003 06:07 AM UTC
If the column in actually in the datagrid, you can get it directly from the datagrid. Here is code that will get the value for column 3 on the same row.
object val = this..DataGridTableStyle.DataGrid[rowNum, 3];
DODongNovember 28, 2003 05:23 PM UTC
> If the column in actually in the datagrid, you can get it directly from the datagrid. Here is code that will get the value for column 3 on the same row.
>
>
> object val = this..DataGridTableStyle.DataGrid[rowNum, 3];
>
The solution provided in Q5.20 has some major limitation. You cannot sort the rows with the icon colume. Does anyone know how to implement an icon datagrid colume which is sortable?