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
715
post selected row or row id to server on button click
posted

I want to select a row from my igGrid and when submit button is clicked, I want that entire row to be passed down to the action method of the submit button. How can I do that ?

I have set features.Selection().Mode(SelectionMode.Row);

Is there a way to pass the entire row which was seleected to the action method or could i atleast get the id of the row selected. 

Also is there a way other than using Jquery, Is there a .feature=> property through which we can pass the row or row id on button click. If not then please tell me how to do it through Jquery.

I need to know this urgently. Any help would be appreciated. also I have read the IgnitUi's website demo but still i cannot seem to achieve what i want . 

If you could provide a short working sample , that would be great. 

Thanks. 

Parents
  • 18204
    Verified Answer
    Offline posted

    Hello zeppelin led,

     

    Thank you for posting in our forums!

    If you are submitting a form, you can pass the selected row's rowId through a hidden input.  You can handle the rowSelectionChanged event to set the value of the hidden input.  You can then use this id to get the rest of the row's data you may need on the server.  Please see my attached sample for a demonstration of this.

    You can find more information on the rowSelectionChanged event in our documentation here:

    https://www.igniteui.com/help/api/2014.1/ui.iggridselection#events

    If you have any further questions or concerns with this, please let me know.

    igGrid_PostSelectedRow.zip
Reply Children