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.
Syncfusion Feedback

GridStyleInfo''s DataSource property

Thread ID:

Created:

Updated:

Platform:

Replies:

19236 Sep 21,2004 06:30 PM UTC Sep 21,2004 11:18 PM UTC Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 21, 2004 06:30 PM UTC

Are there be any known difficulties in binding a GridStyleInfo to a non-traditional data source - something other than a dataset or dataview? I have a class with some properties that I would like to display in a grid row but I''m having some troubles hooking the binding up using the DataSource, ValueMember properties of the GridStyleInfo object... model[1, 3].DataSource = searchCriteria; model[1, 3].DisplayMember = "BindProperty"; model[1, 3].ValueMember = "BindProperty"; model[1, 3].CellValue = searchCriteria.BindProperty;

Administrator [Syncfusion]
Replied On September 21, 2004 07:01 PM UTC

To further clarify, the property in my datasource doesn''t change as the values in the grid cell change. I also added an event handler to the grid''s SaveCellInfo event and I noticed that the "Handled" property of the event args was false - if that''s any help. >Are there be any known difficulties in binding a GridStyleInfo to a non-traditional data source - something other than a dataset or dataview? >I have a class with some properties that I would like to display in a grid row but I''m having some troubles hooking the binding up using the DataSource, ValueMember properties of the GridStyleInfo object... > >model[1, 3].DataSource = searchCriteria; >model[1, 3].DisplayMember = "BindProperty"; >model[1, 3].ValueMember = "BindProperty"; >model[1, 3].CellValue = searchCriteria.BindProperty;

Administrator [Syncfusion]
Replied On September 21, 2004 07:59 PM UTC

Is searchCriteria some kind of IList or IListSource object? If not, the above code will not work. Also, you would have to be using a GridControl, and not a GridDataBoundGrid for such code to work.

Administrator [Syncfusion]
Replied On September 21, 2004 08:10 PM UTC

It is a GridControl but, no, the object I''m trying to use as a datasource is not a list. I guess the best way to deal with "binding" is getting/retrieving the values during an event (CurrentCellChanged probably?) Thanks Clay.

Administrator [Syncfusion]
Replied On September 21, 2004 11:18 PM UTC

You could use the QueryCellInfo event to dynamically provide the e.Style.CellValue for a particular cell from your data cache, and then use SaveCellInfo to move any modified value from e.Style.CellValue back to your data cache.

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

;