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

problem combobox and arraylist

Thread ID:

Created:

Updated:

Platform:

Replies:

37200 Nov 17,2005 10:57 AM UTC Nov 17,2005 12:39 PM UTC Windows Forms 2
loading
Tags: GridControl
Filip L'Hommelet
Asked On November 17, 2005 10:57 AM UTC

I have two databoundgrids that are related with eachother. grid1 has one column grid2 has several columns I''m using an arraylist as datasource for one of the columns in grid2. Depending on what row I am in in grid1, the values in the arraylist change. So I implemented CurrentCellActivated in grid1 where I clear my arraylist and refill it depending on the value I have at that time in grid1. When I debug, I see my arraylist is filled in a correct way, yet when I look at my combobox in grid2, it still has the original values??? do I need to refresh my grid2 or something? any help would be appreciated :)

Administrator [Syncfusion]
Replied On November 17, 2005 11:24 AM UTC

Try using using CurrentCellShowingDropDown to set the DataSource on the dropped list. Here is a KB link discussing something similar. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=115 One thing you need to take into account is that initially the DataSource for the whole column should be set to a list that includes all possible values that would appear in the cell. For example, this might be an unfiltered DataView. Then in CurrentCellShowingDropDown, you set the RowFilter property on that dataview to only display the choices you need for that particular dropdown. (Setting this all-inclusive list initially avoids problems with invalid choices when you dynamically change the source list on individual cells to something different. If all the different droplists are fixed - only vary from row to row - then you will probably not need to worry about this all inclusive-list in your arraylist situation).

Filip L'Hommelet
Replied On November 17, 2005 12:39 PM UTC

the KB-link wasn''t too clear, but I cannot thank you enough for your own explanation, because that works! thank you for this solution! >Try using using CurrentCellShowingDropDown to set the DataSource on the dropped list. Here is a KB link discussing something similar. > >http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=115 > >One thing you need to take into account is that initially the DataSource for the whole column should be set to a list that includes all possible values that would appear in the cell. For example, this might be an unfiltered DataView. Then in CurrentCellShowingDropDown, you set the RowFilter property on that dataview to only display the choices you need for that particular dropdown. (Setting this all-inclusive list initially avoids problems with invalid choices when you dynamically change the source list on individual cells to something different. If all the different droplists are fixed - only vary from row to row - then you will probably not need to worry about this all inclusive-list in your arraylist situation).

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

;