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.

Unbound column in DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

9424 Dec 17,2003 08:04 AM Feb 6,2004 02:50 AM Windows Forms 5
loading
Tags: GridControl
Alexander Arlievsky
Asked On December 17, 2003 08:04 AM

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 08:08 AM

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 04:37 PM

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 05:34 PM

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.

chinni
Replied On February 5, 2004 09:44 PM

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 02:50 AM

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.

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.

;