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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unbound column in DataBoundGrid

Thread ID:





9424 Dec 17,2003 01:04 PM UTC Feb 6,2004 07:50 AM UTC WinForms 5
Tags: GridControl
Alexander Arlievsky
Asked On December 17, 2003 01:04 PM UTC

Hi, I have DataBoundGrid binded to table in DataSet. I am adding unbound column to GridBoundColumns collection. When I''m trying to set value to the cell in unbound column - the cell remains empty. ..... int unboundColIdx = 2; gridDataBoundGrid1[1,unboundColIdx].Text = "aaa"; ..... What I have to do in order to display constant values in unbound column? Thanks, Alex.

Administrator [Syncfusion]
Replied On December 17, 2003 01:08 PM UTC

You would need to handle the grid.Model.QueryCellInfo event and if e.ColIndex points to your unbound column and e.RowIndex > 0, then set e.Style.Text to the value you want to see for this row.

Greg Shomette
Replied On January 23, 2004 09:37 PM UTC

Is there an other event that I can use instead of QueryCellInfo. When I use QueryCellInfo event everytime I touch the grid it fires, I need to enter a value in my qty column and after the value changes in the qty column I would like to have a unbound calculated column. Thanks

Administrator [Syncfusion]
Replied On January 23, 2004 10:34 PM UTC

QueryCellInfo is the place you need to do this. The event is fired everytime something needs teh value of a cell. You should use e.ColIndex and e.RowIndex to control exactly when you hit your code to provide the value for your unbound column. You could store the calculations in some structure like an array or arraylist or hashtable, and do the calculations and store the calculated values into your structure in a CuurentCellAcceptedChanges event (for example). Buy you still will have to handle QueryCellInfo to provide the values from your structure when the QueryCellInfo requests one of your unbound columns.

Replied On February 6, 2004 02:44 AM UTC

Where do i find this event grid.Model.QueryCellInfo event can anyone send me an example of this

Administrator [Syncfusion]
Replied On February 6, 2004 07:50 AM UTC

Do a ''Find in Files'' on QueryCellInfo in the Syncfusion\Essential Suite\Grid\Samples folder and you will get 80 or 90 hits for samples uses of this event. If you are using it in a GridDataBoundgrid, try the Grid\Samples\DataBound\GDBGMultiHeader sample. The virtual grid tutorials are another straight-forward example, but it is based on a GridCotrol. But the idea is the same.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon