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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamically change row type

Thread ID:





47580 Aug 8,2006 03:09 PM UTC Aug 9,2006 09:42 AM UTC WinForms 3
Tags: GridControl
Asked On August 8, 2006 03:09 PM UTC

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 06:42 AM UTC

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.

Srividhya R


Replied On August 9, 2006 07:54 AM UTC


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?


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

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:


Let us know if you have any further queries.

Srividhya R


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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