Hello
I was wondering if somone could help me with a problem i'm having.
I have a grid with 4 or 5 columns and 1 to many rows. In the first 3 columns i have drop down lists. After a user has made selections in the drop down lists for the rows of the grid I would like them to be able to save their selections and reload them again later.
I have currently been saving out their selections but am having problems reloading them. I can't seem to find a way to programatically select the items in the drop down lists. I can put the text into the columns of the grids easy enough but the drop downs have display and value members and i need to access the value member as well.
Is this possible to programmatically simulate selecting an item in the gird's drop down lists?
Thank you for any assistance.
Yes, GetText is a good way to search the list. :)
Hi Mike
Thanks Mike for this, sorry no it's just me not knowing really. I had been saving the text and restoring that to the cell. I thought it would auto-select the item from the list and hence i'd be able to access the value as well. I should have guessed/tried saving and restoring the value instead. I'll change the way i'm doing it and store and restore the values.
Before I restore the value to the grid would the best way to check that the item is still in the drop down list to use the column's valuelist function GetText? i.e.: grid.DisplayLayout.Bands(0).Columns(0).ValueList.GetText(value,.........
Thanks again Mike, you have saved me from quite a headache.
Hi,
What's your data source? How are you saving and loading the data?
It seems to me that all you need to do is store and restore the Value of the cell. Setting the Value on the cell wil automatically display the appropriate DisplayText as determined by the ValueList on that cell. So you don't have to do anything to the ValueList.
I get the feeling that I am missing something about your question.