-
18 Mar 2007 7:09 PM #1
Grid Single Selection only?
Grid Single Selection only?
Hi. I have just started using Ext 1.0 and the grid and I'm still trying to understand how it all works.
For some of my grids I want to restrict the selection to only allow a single row to be selected. What is the "correct" way of doing this? Is there a property I can set or do I need to handle an event to prevent multiple selection from occurring?
-
18 Mar 2007 7:24 PM #2
Code:var sm = new Grid.RowSelectionModel({singleSelect:true});Belgabor's Ext Playground - Showcase for my Extensions
-
18 Mar 2007 7:31 PM #3
That works, thanks! (Except I did new Ext.grid.RowSelectionModel...)

-
18 Mar 2007 7:55 PM #4
Ah sorry, I copy&pasted from my source and missed that I had used a shortcut
Belgabor's Ext Playground - Showcase for my Extensions
-
5 Mar 2009 8:41 PM #5
Why do you people always gives only these "NON WORKING CODES"?
Why do you not giving fully functinal code?
1. Including whole script with modification..
I have no absoletley time to investigage where HELL i must place that code anf how and what other scripting I must to do..
Sorry about my anger..
But if you give the whole code here and with web example I am aple to solve my coding problems faster..
-
14 Apr 2011 5:40 AM #6
What you need and where!
What you need and where!
In the definition of your Ext.grid.GridPanel object include the follow property.
selModel: new Ext.grid.RowSelectionModel({singleSelect: true}),
Remembering to only include the comma at the end if there is another property to follow; some browsers let this go, some(IE) don't. The selModel property of the GridPanel object is itself an object; of type RowSelectionModel by default. We are constructing a RowSelectionModel object and defining a single property singleSelect = true.
Similar Threads
-
Detecting single/multiple select in grid
By arnair in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 16 Jul 2007, 11:00 PM -
set/change backgroundcolor of a single cell in grid
By humpdi in forum Ext 1.x: Help & DiscussionReplies: 4Last Post: 10 May 2007, 5:40 AM -
EditorGrid Single Selection Model bug?
By coltsfan2k in forum Ext 1.x: BugsReplies: 1Last Post: 23 Mar 2007, 4:17 PM -
Single json post for a grid and a JsonView
By BernardChhun in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 5 Jan 2007, 10:28 AM -
How to listen to grid selection changes?
By gcsolaroli in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 14 Dec 2006, 12:19 AM


Reply With Quote