We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datagrid question #5.20, ie., datagrid with icon column

Thread ID:

Created:

Updated:

Platform:

Replies:

4013 Apr 23,2003 06:27 PM UTC Nov 28,2003 05:23 PM UTC WinForms 2
loading
Tags: FAQ
HP
Asked On April 23, 2003 06:27 PM UTC

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

Administrator [Syncfusion]
Replied On 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];

Dong
Replied On November 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?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;