Oleg Medyanik
Top achievements
Rank 1
Oleg Medyanik
asked on 22 Sep 2009, 11:15 AM
Hi,
I am using client side binding and it seems to me that getDataKeyValue retrieves wrong values.
screenshot
On screen shot you see how i retrieve values from grid and actual variable values.
_dataItem contains correct values, but getDataKeyValue returns incorrect.
Am i doing something wrong?
Telerik.Web.UI.dll version is 2009.2.826.35
browsers - FF3.5.3 and IE 8
I am using client side binding and it seems to me that getDataKeyValue retrieves wrong values.
screenshot
On screen shot you see how i retrieve values from grid and actual variable values.
_dataItem contains correct values, but getDataKeyValue returns incorrect.
Am i doing something wrong?
Telerik.Web.UI.dll version is 2009.2.826.35
browsers - FF3.5.3 and IE 8
6 Answers, 1 is accepted
0
Hello Oleg,
I am attaching a sample project I made for you showing how to extract datakey values client side.
Please take a look at it and tell me whether you find it useful.
Best wishes,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I am attaching a sample project I made for you showing how to extract datakey values client side.
Please take a look at it and tell me whether you find it useful.
Best wishes,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Oleg Medyanik
Top achievements
Rank 1
answered on 28 Sep 2009, 06:26 AM
Hi Mira.
Thank you, but seems you've attached project showing how to make grid selectable only by clicking check boxes.
I am currently using workaround like this
var dataItem = GetGridMtv().get_dataItems()[rowindex];
//var invalid = dataItem.getDataKeyValue("IsInvalid"); <-- returns wrong value
var invalid = dataItem._dataItem.IsInvalid; <--returns right value
Thank you, but seems you've attached project showing how to make grid selectable only by clicking check boxes.
I am currently using workaround like this
var dataItem = GetGridMtv().get_dataItems()[rowindex];
//var invalid = dataItem.getDataKeyValue("IsInvalid"); <-- returns wrong value
var invalid = dataItem._dataItem.IsInvalid; <--returns right value
0
Hi Oleg,
I am attaching a modification of the project I sent you in which the rows are selected on row click and the getDataKeyValue() method returns the correct values.
Please take a look at it and tell me whether you find it useful.
Greetings,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I am attaching a modification of the project I sent you in which the rows are selected on row click and the getDataKeyValue() method returns the correct values.
Please take a look at it and tell me whether you find it useful.
Greetings,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Oleg Medyanik
Top achievements
Rank 1
answered on 30 Sep 2009, 06:37 PM
Hi Mira.
I've slightly modified attached project to show when getDataKeyValue is not working for me
JS:
C#
That's all in code modifications.
Now please filter
Name - Starts with "Gula"
Unit Price - Sort Desc
On 2nd or 3d click in grid i receive different values (i suspect it is true for bool type)
Here is the Screenshot showing vars in debugger and in alert window
Thank You!
I've slightly modified attached project to show when getDataKeyValue is not working for me
JS:
| function RowSelected(sender, args) |
| { |
| var tmp = sender.get_masterTableView().get_selectedItems()[0].getDataKeyValue("Discontinued"); |
| var tmp2 = sender.get_masterTableView().get_selectedItems()[0]._dataItem.Discontinued; |
| alert("getDataKeyValue returned: " + tmp + "\nDirect access returned: " + tmp2); |
| } |
C#
| <MasterTableView ClientDataKeyNames="Name,Discontinued"> |
That's all in code modifications.
Now please filter
Name - Starts with "Gula"
Unit Price - Sort Desc
On 2nd or 3d click in grid i receive different values (i suspect it is true for bool type)
Here is the Screenshot showing vars in debugger and in alert window
Thank You!
0
Hello Oleg,
Unfortunately I still unable to replicate the described issue. I added the Discontinued column in my project and tried following your steps and everything works as expected. You can see this video for further details.
If the problems continue, please open a formal support ticket and attach a sample project replicating them. We will debug it locally and get back to you with our findings.
Sincerely yours,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Unfortunately I still unable to replicate the described issue. I added the Discontinued column in my project and tried following your steps and everything works as expected. You can see this video for further details.
If the problems continue, please open a formal support ticket and attach a sample project replicating them. We will debug it locally and get back to you with our findings.
Sincerely yours,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Oleg Medyanik
Top achievements
Rank 1
answered on 07 Oct 2009, 06:33 AM
Thanks Mira for your time and care.
I currently have workaround.
Even if you fix something there will be too much code to change on my side )).
Sincerely yours, Oleg
I currently have workaround.
Even if you fix something there will be too much code to change on my side )).
Sincerely yours, Oleg