|
Rank: Member Groups: Member
Joined: 8/26/2007 Posts: 12
|
Hi while working with the button Column in the Grid control, I need to capture the primary key which is key property of GridItem (GridItem.key). I modified the java script code in the demo to read as follows
function OnItemCommand(grid,itemIndex, colIndex, commandName ) { var item = grid.getItem(itemIndex); var cell = item.getCell(2); var itkey = item.key; window.alert("Topic:" + cell.getValue() + " Item key is: " + itkey ); }
the value returns is 'Undefined'. I know same grid does have key value defined because i can run update method successfully by getting. item.key property in visual basic code Thanks in advance
Sanjay
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will need to use item.getKey() instead of item.Key. The syntax for the client side interface is slightly different than that of the server side.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 8/26/2007 Posts: 12
|
tried item.GetKey() with same results. see working page at www.sangwanmd.com/medrec you can see the key when you update the page as a label next to update button
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
|
|
Rank: Member Groups: Member
Joined: 8/26/2007 Posts: 12
|
It works.. Thanks for your excellent and timely support. your product works like charm I appreciate your help
|
|