I would like to send from the server what checkboxes should appear checked when initializing the grid?
I've seen the there are Selection methods to set the selected rows, but I've not found any method for the RowSelector checkboxes.
How can I do it?
Thanks
Hello Olivier,
Please take a look at the other thread about the issue you are experiencing. The solution in this thread was aimed at providing a way to check checkboxes in the 11.2 version, in which checkbox and regular selection were detached from each other and the Selection API was not able to alter the checkbox states. This is no longer valid in later versions (12.1+).
Thank you for using Infragistics forums!
Best regards,
Stamen Stoychev
Hello Stamen,
The idea of using $ ("# Grid tbody th> span [data-role = 'checkbox']: eq (" + rowIndex + ")"). Trigger ("click") is good. However in my case I do not know when I have to initialize checked rows.I used the event "pagerRendering" to check the rows but at the unchecked the row stay active.. What event should I use? I am looking for the equivalent of a redraw event.
Regards,Olivier
Yes basically my situation is this:
- I have row selectors with checkboxes, although that is not the only trigger for edit.
- I really have one cell that is editable, if you double click on that cell ("AmountToPay") - the grid will enter edit mode
- I also have custom summaries on the page which I was able to do, in addition to the built-in "SUM" functions of "TotalDue" and "AmountToPay", I have a custom summary that shows "SelectedAmountToPay".
My user experience requirement is this:
- When a user edits an item, after they finish editing, the row they edited should remain selected because that custom summary will reflect how much they have have decided to pay.
I am pretty much close to all my requirements but I cannot get the row to select again so the custom summary can fire after edit is complete.
Hi again,
Sorry I think I misunderstood you. If you wish to retain the selection when a row goes into edit mode and you do the selection only through the checkboxes, you can try the following:
$("#Grid").live("iggridselectionrowselectionchanging", function () { return false; });
instead of your current event handler. However in this case you will no longer be able to select rows by clicking on them, this will only activate them. Rows will only be selectable through the checkboxes. If this is unacceptable, please let me know and I'll try to provide you with a better solution!
Hi, I tried this, but it still doesn't select. Is there some other property I need to set?
Here are my Selection settings:
features.RowSelectors().EnableRowNumbering(false).EnableCheckBoxes(true); features.Selection() .Mode(SelectionMode.Row) .MultipleSelection(true);
Here are my Edit Settings:
features.Updating() .EnableAddRow(false) .EnableDeleteRow(false) .EditMode(GridEditMode.Row) .StartEditTriggers(GridStartEditTriggers.Click)
Here is my event handler:
$(document).live("#Grid", "iggridupdatingeditrowended", function(evt, ui) { var rowIndex = $('#Grid > tbody > tr').index($("[data-id='" + ui.rowID + "']")); $('#Grid').igGridSelection('selectRow', rowIndex); $("#Grid tbody th>span[data-role='checkbox']:eq(" + rowIndex + ")").trigger("click"); });
After a row is edited, and I click "Done", it doesn't keep the selection