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
10240
How to get value from WDG into the dropdown provided editor
posted

Hello,

What is needed is to get the value selected from the grid into the dropdown text editor?

  • 425
    Offline posted

    How can we do that at server side?

  • 10240
    Suggested Answer
    posted

    Hello,

    In your application are you handling the WebDataGrid RowSelectionChanged client-side event? In this event you can get the Selected row of the grid, get the grid cell you want and take the text and put it in the dropdown provider current value. For example:

    function rowSelChange(sender, args) {

    var dd = $find('<%= WebDropDown1.ClientID %>');

    var row = args.getSelectedRows().getItem(0).get_cell(1).get_text();

    dd.set_currentValue(row, true);

    dd._elements["Input"].focus();

    dd.closeDropDown();

    }

    Please let me know if you need any additional assistance regarding this matter.

    *Sample is attached. Please note that the ig_res folder has been omitted due to file size constraints. For proper styling of the grid you will want to add the ig_res folder. To do so, simple open the web form designer (aspx) and accept the styles when prompted.

    WDDP_w_grid.zip