Hi
I working on UltraWebGird
My Requirement is I can select Multipule cells (that contains 'Int' Values) on the grid
I need the all the selected values to collect in variable to sum(Addition) ,
And I have to display the same in TooTip.
I am unable to get the selected cell values
Plz help me
Thanks in Advance
My code is like this
<%
%>
<!
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <
<
> <
="server">
> </
</
="text/javascript"> function
function
WebDataDrid1_PageIndexChanging() { GetGridSelectedRows(
GetGridSelectedRows(
); }
}
GetGridSelectedRows(gridname) {
grid = $find(gridname);
behav = grid.get_behaviors();
selection = behav.get_selection();
pageindex = behav.get_paging().get_pageIndex();
selectedRows = selection.get_selectedRows();
; hidSelections = document.getElementById(
hidSelections = document.getElementById(
);
(i = 0; i < selectedRows.get_length(); i++) {
;
(hidSelections.value.indexOf(item) < 0) { strSelection += item; } } hidSelections.value = hidSelections.value + strSelection; }
strSelection += item;
hidSelections.value = hidSelections.value + strSelection;
>
="SELECT ID, ID AS Expr1, ID AS Expr2, ID AS Expr3 FROM Customer">
/>
="ID">
="Multiple">
="False">
PagingClientEvents
="WebDataDrid1_PageIndexChanging"
="Expr1">
="Expr2">
="Expr3">
Hello,
You can enumerate all cells in the grid with javascript and use the CSOM (client-side object model) function getValue to obtain the value from it. A cell can be reached with something similar to the following javascript
var grid = igtbl_getGridById(gridname);var row = grid.getRow(0); // first row in the root bandvar cell = row.getCell(3); // fourth cell in the rowvar cellval = cell.getValue();
You can get the selected status of a cell on the client side using the getSelected function. More information can be found in the online documented, in the Cell client-side object model docs here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/WebGrid_cell_Object_CSOM.html