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.
Unfortunately, activation email could not send to your email. Please try again.

Dynamically change row type

Thread ID:

Created:

Updated:

Platform:

Replies:

47580 Aug 8,2006 11:09 AM Aug 9,2006 05:42 AM Windows Forms 3
loading
Tags: GridControl
Jay
Asked On August 8, 2006 11:09 AM

I need to create a two column grid. The first column will contain the field name, the second column will contain the data. Is it possible to set a different data type for different rows in the same column or would I have to make them all strings?

Thanks in advance.

Administrator [Syncfusion]
Replied On August 9, 2006 02:42 AM

Hi Jay,

To achieve this, you need to handle the QueryCellInfo event and set the CellValueType property of the cell (e.Style.CellValueType = typeof(int) ). Here is a minimal sample to implement this.

Thanks,
Srividhya R

RowType.zip

Jay
Replied On August 9, 2006 03:54 AM

Hi,

So this means just before the user selects the second column to edit it''s value, setting the cellvalue in QueryCellInfo will change a textbox column to a monthcalender or dropdown, and they will function correctly?

Thx

Administrator [Syncfusion]
Replied On August 9, 2006 05:42 AM

Hi Jay,

The QueryCellInfo event is normally used to provide the GridStyleInfo object for a given cell. If the underlying datasource accepts, then ofcourse you can change the CellValueType and CellValues by handling this event. To know more about QueryCellInfo, you can take a look at
this documentation:

http://www2.syncfusion.com/library/gridwindows/querycellinfoevent.html

Let us know if you have any further queries.

Thanks,
Srividhya R

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.

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.

;