18 Feb 2011 5:10 AM #1
Row multiselect with CheckboxSelectionModel fires rowselect event multiple times
I have a grid with CheckboxSelectionModel and multiselection enabled. I have function that gets and displays data from server with AJAX call on rowselect event. I want to execute the AJAX call only when there is one row selected. Everything works fine if I select just one row, but if I select multiple rows with "Shift" key the rowselect event gets fired as many times as there are selections. For example if I select two rows the rowselect event gets fired 2 times:
1) first time with only the first row selected
2) second time with two rows selected in selection model
I can check if selection model has more than one row selected and call AJAX only if there is one row selected. But in this case AJAX will happen for the first rowselect call.
Is there a way to determine if there are more than one row selected and fire the rowselect function only if there is one row selected?
Any help appreciated.
By Serge Adda in forum Ext GWT: Help & Discussion (1.x)Replies: 1Last Post: 15 Jan 2010, 10:34 AM
By christa in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 21 Aug 2008, 4:52 AM
By khepri in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 7 Jul 2008, 5:20 AM
By Bionique in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 10 Apr 2008, 1:54 AM