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

GridDataBoundGrid cell''s datasource property

Thread ID:





31592 Jul 11,2005 12:29 PM UTC Jul 11,2005 01:16 PM UTC WinForms 1
Tags: GridControl
Asked On July 11, 2005 12:29 PM UTC

I have a column with a combobox where the datasource for the combobox is dependent upon the value of another column in the row (a foreign key column). I''m trying to set the datasource for the combobox cell via the Datasource property like this: grid(row,col).Datasource = SomeMethod(foreignKeyValueForThisRow) In debug mode the datasource remains Nothing after the assignment, even though the method returns an ArrayList with a length > 0. Is there something wrong with this technique? The foreign key column is static for each row, so I''m trying to set this up just once at load time. Or do I need to do it in some event like CurrentCellShowingDropDown? Thanks for any help you can provide! Rick

Administrator [Syncfusion]
Replied On July 11, 2005 01:16 PM UTC

You cannot set cell specific properties (except Text and CellValue) on a GridDataBoundGrid using an indexer. Instead, you either have to set the properties on a column using either grid.GridBoundColumns or grid.Binder.InternalColumns depending upon whether you have explicitly added gridboundcolumns or not. Here is a KB on this. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=83 But for a porperty like DataSource, you would want to use Model.QueryCellInfo as in this KB. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=95


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