User Option to Select all rows in a datagrid
smadduri
Member
Hi ,
I have datagrid with paging enabled having multiple rows .
my requirement is to select all the rows inside the data grid with an option provided '"Select ALL" which should select all rows inside datagrid.
Can any help me how this can be achieved .
Regards
Srini
Tagged:
0
Comments
-
You can include this as your first header column
<dmf:datagridTh resizable="false" nowrap="true" width="30"> <input type="checkbox" id="clearSelection" name="clearSelection" onclick="selectDeselect(this)" ></dmf:datagridTh>
and this as the first column
<dmf:datagridRowTd scope="row" nowrap="true" width="30" align="center"> <dmf:checkbox id="boxSelection" name="boxSelection" /> <dmf:label id="labelObjectId" name="labelObjectId" datafield="r_object_id" visible="false"/> </dmf:datagridRowTd>
and handle the selection/deselection via javascript
function selectDeselect(box) { var elementsArray = document.getElementsByName('boxSelection'); for (i = 0; i < elementsArray.length; i++) { elementsArray[i].checked = box.checked ; }}
But perhaps there's a better, more elegant, more WDK way of doing this.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories