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
235
UltraDropDown Text change in UltraWinGrid.UltraGrid
posted

Hi ,

I have attached a ultradropdown to ultragird as valueslist in a column.

my first row of the dropdwon text is "NONE",  when i select the NONE row i want to replace the NONE witht the string.empty. but it is not allowing me to change the text.

When i change the text in the grid ultradropdonw events are not fireing.

 

i have handed the same for the ultracombo it is working fine.

 protected override void OnAfterCloseUp(EventArgs e)
        {
            base.OnAfterCloseUp(e);

            if (this.Text == " {None}")
            {
                this.Value = null;
                this.Text = string.Empty;

            }
        }

Please help me in this regard.


Thanks

Subbu.

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Subbu,

    I'm not sure I follow you. But my guess is that the Style of the column is set to DropDownList and therefore the cell will not accept a value that is not on the list.

    Also, changing the value of the cell in OnAfterCloseUp might be too early. Perhaps this code you have here is working, but then the control is overwriting the text with some other value.

    I don't think you will be able to do this by setting the Value. A better way to do this might be to use a DataFilter so that you could translate the Editor value of the control "{None}" into a display value of an empty string, and vice versa.

Reply Children