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.
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.
how to get the iggrid selected row data in igtexteditor while cliking on the row in iggrid
Hello ,
Earlier I wrote the code of Grid in my View (.cshtml) file and there i registered the rowSelectionChanged Client Event like this ->
In View (.cshtml)
.Features(features => { features.Selection().Mode(SelectionMode.Row).AddClientEvent("rowSelectionChanged", "rowSelectionChangedHandler"); ; })
NOW I have shifted all my grid code to the Controller and I am adding features of the grid in the cotroller's GridModel. I am making the grid model like this->
In Controller(.cs)
gridModel.Features.Add(new GridTooltips()); gridModel.Features.Add(new GridFiltering() { Type = OpType.Remote, Inherit = true}); gridModel.Features.Add(new GridSorting() { Type = OpType.Remote, Inherit = true }); gridModel.Features.Add(new GridPaging() { Type = OpType.Remote, Inherit = true, PageSize = 5 ,CurrentPageIndex=0,TotalRecordsCount=20 }); gridModel.Features.Add(new GridSelection() { Mode = SelectionMode.Row });
// How can i register the rowSelectionChanged Client Event to my "rowSelectionChangedHandler" in my controller file.
please if you could show me the code snippet that does that that would really help.
Thanks alot man. Thats what i was looking for.