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

Data Bound Grid with bound & non bound columns

Thread ID:

Created:

Updated:

Platform:

Replies:

17099 Jul 31,2004 05:33 AM UTC Jul 31,2004 06:13 AM UTC WinForms 1
loading
Tags: GridControl
Ranjana Gundawar
Asked On July 31, 2004 05:33 AM UTC

Hello, My application has following requirement: Data Bound Grid should have two bound columns ContactID & Percent from table A and three non bound (No Mapping name) columns from another table. These three columns basically just displays contact info like Given name, surname etc for given ContactID. Both bound columns are editable. On edit of ContactId, other three non bound columns should be updated. When my program try to update those non bound columns by grabing row & column index, value of bound columns disappear as well as non bound columns does not display anything. I am not sure whether I am correct in combining bound & non bound coulmns from two different table. Any suggestion please? thanks for reply to my last question.

Administrator [Syncfusion]
Replied On July 31, 2004 06:13 AM UTC

Take a look at the Grid\Samples\DataBound\MultiHeader sample. It adds an unbound checkbox on the left side and an unbound column on the right side. The steps are: 1) Add a GridBoundColumn in the GridBoundColumns collection (or Binder.InternalColumns if you have not explicitly added GridBoundColumns). In the sample, serach for "Unbound" to see this code. 2) Add some datastructure to hold the data that is to occupy this column. The sample uses a HashTable unboundValues. You would get yours directly from the second DataTable. 3) Handle the GridDataBoundGrid.Model.QueryCellInfo event to provide the values to the grid from your second DataTable for your unbound column. See ModelQueryCellInfo in the sample. 4) Handle the GridDataBoundGrid.Model.SaveCellInfo event to save the values from the unbound column to the second DataTable. See ModelSaveCellInfo in the sample.

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

;