Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Getting text of dropdownprovider in webdatagrid after postback
posted

Hi I have an issue where I am trying to retrieve the text of the dropdownitem which was selected in a dropdownprovider once a postback occurs (via a submit button on the form).

I can't put the text in the value of the dropdown either since I need to have related data (which gets parsed and populated to other columns on client events) for the value.  For example, I have my dropdownprovider which has PC Types in it and the Text is the description of PCs while the value is the breakout of costs in a delimited string which I split and send to other columns during the SelectionChanged client event of the dropdownprovider.  Is there a way to set the Text of that column so that it is retrieved once posted back?

I tried to do something like this PCTypeCell = arg._cell._row.get_cell("PCType"); (on Grid Entered Edit) and then PCTypeCell.set_text(sender.get_activeItem().get_text()); (on dropdownprovider SelectionChanged).  This still doesn't seem to force the column to have the text value once the form is posted back.

Is there anyway that I can retrieve just the text of the selected item during postback when looping through grid.Rows to update my data? row.Items.FindItemByKey("PCType").Text always seems to get the value of the selectedItem from the dropdownprovider.

Parents
No Data
Reply
  • 25665
    Offline posted

    Hello Patrick,

    Thank you for contacting Infragistics!

    I have some follow up questions concerning this matter. How do you have your DropDownProvider setup? Do you bind to different fields for the TextField and ValueField properties? How are your grid and columns setup?

Children