Get row id
I am using php and each row that is pulled has an 'id'.
When the row in the grid is clicked i want to be able to do something with that id.
What file do I need to look in? Thanks
Grid.getSelectionProperty("index") method is quite OK to use. but I am looking
at a way to assign the unique ids of recordset in a table to the indices of rows in grid.
Plz give the code to do so...
I have posted for it many times but didn't got any satified results :(
Hope this solution may help others.....
I have found the solution to the problem.
There is no need to assign the unque ids of recordsets in ur dbase table to the rows in the grid.
This has been a problem with many of the people using Activewidgets.
There is a very simple solution:
1. Make a column for the ids retrieved from the data model(whatever it may be): XML, MySql , JS Array or any other
in the same manner as ids are also part of data to be shown in the grid.
2. Hide the id column using method
(Grid.setColumnIndices([1,2,3...]));//Remember 0 has been omitted, it represents 1st column.
3.Retrieve the id on the keypress/keydown event of delete key, I hv used click event so change it.
obj.onRowClicked = function(event, index)
//Get the contents of cell with Column index '0' and RowIndex 'index'.
var id = obj.getCellValue(0, index);
loadGridAfterDelete(id);//Function to be called inorder to delete the data of particular id retrieved
Note: the example is for Grid V2.0 b2
Deleted, There is nothing more. U can use the same method to add/edit also.
0 seems to be the first colomn of data you load.
this will give the index of row clicked
This topic is archived.
Back to support forum
Version 2Looking for AW 2.6 ?
The old site is here.