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
340
Default values in AddRow
posted

I have a WebDataGrid with Row Adding enabled.  I have a column for partNumber, one for PO, and one column contains a dropdown list.  Outside the grid, I have a textbox, radiobuttons, and a search button. 

1. How do I set a default value for the dropdown list in the addRow?  Setting Selected="True" in the editor control does not accomplish this.

2. Depending on the radio button selection, I need either partNumber or PO in the addRow to default to the textbox text after the search is performed.  How would I set this?

Parents
  • 49378
    posted

    Hello Jesse,

     

    In this scenario setting the values of the adding row fields can be achieved using something similar to:

    ig_controls.WebDataGrid1.get_behaviors().get_editingCore().get_behaviors().get_rowAdding().get_row().get_cell(3).set_value("some new value");

     

    Note that setting the value for a field with a dropdown provider in that fashion would set the current value for the dropdown provider as well.

    Hope this helps. Please do not hesitate to contact me with any questions.

Reply Children
No Data