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
465
How to refresh UltraDropDown column after adding new row in WinGrid
posted

Hi,

I have a WinGrid based on Table A. I have column AA which is UltraDropDown column with value from Table B. Table B holds all possible values for column AA in Table A.
I am modifying Table A and I am adding new value to column AA. I want to add also new record in Table B and refresh UltraDropDown with new value.

I can modify Table B easily but I have a problem with UltraDropDown on column AA in Table A.

Then I am trying to add new row (to UltreDropDown) like this:

UltraGridRow newrow = this.ultraDropDownGrid.DisplayLayout.Bands[0].AddNew()

I am getting an error that I UltraDropDown is not supporting ADD functionality.

My question is how can I spouse to add new value to UltraDropDown or refresh data with new values ?

Regards
Piotr

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Piotr,

    UltraDropDown does not support added new rows through the UI, which is what this line of code is trying to do.

    The good news is that you don't have to. If you add a row to Table B and the UltraDropDown is bound to table B, then that row should show up in the DropDown automatically. If it's not showing up, then something it wrong.

    One possible reason for this is that Table B does not notify bound controls that a new row has been added. What type is Table B? Is it a DataTable? Or is it some custom collection you created?

    Either way, you should be able to force the UltraDropDown to refresh itself easily enough by calling UltraDropDown.Rows.Refresh(ReloadData). Obviously you would call this method immediately after you updated Table B.

Children