I'm using alot of javascript to interact with my grid, but I'm finding a problem and no solution, which I hope I can get some help with.
So here's the problem, the creation of my row is done on the codebehind, where I assign a "key" value to the row, for example, the last row added will have something on the line of "grid.Rows[grid.Rows.Count].Key = 'Row' + grid.Rows[grid.Rows.Count];", when I debug the codebehind I can see that it's adding the Key correctly, but when I go to the javascript that needs to acess the key of the row, there doesn't seem to be any property with it, I need to know if this "key" value is kept on somewhere else in the row, or if in fact there's no way to get it in the clientside.
Thanks,
Cláudio Correia
instead of setting key you can do this thing.
add a new hidden column and add your key in this column. so in javascript you will be able to access it easily.
for your problem have you tried this function?
row.getDataKey()
I am not sure wheather it returns the key you have added on server side or not but it might help.
also there is a property called DataKey. if that helps.
Thanks for the reply, regarding the hidden column I was trying to avoid using it since the grid is a bit large already, but it's a solution I'm considering, I'm also looking into using the row id instead of the key, need to change some stuff on the codebehind after but it will probably take less time then trying to work it out with the key. The DataKey property, if I'm not mistaken is read-only on the codebehind, but I haven't researched it for long, I also tried using the Tag property, but after a search on google I found out that "Tag" is not acessible from the client.