First of all, unfortunately unlike your last example, the latest project you sent me runs on a later version of VS than I have. I can get my boss to give me credentials for 2019 but, as you know, that can take some phone time with MS. I see a views folder so I am thinking it is MVC.
However I did take this function from the code.
function getAllDataSourceData() {
var dataSource = $find('MainContent_RadClientDataSource1');
debugger
dataSource.fetch(function (args) {
var data = args.get_data();
alert(data.length);
alert(data[data.length - 1]);
});
alert(dataSource);
As you can see i added an alert which didn't really tell me anything though it did appear as an object. The fact of the matter is:
1. I ran this from onkey press in the RadMaskedTestbox as you suggested.I changed the console logs to alerts. No alerts within the anonymous function appeared. Do alerts not work in anonymous functions? I know the main function ran because I put a debugger statement in it. And the alert showing the datasource does show that it's a valid object.
2. I ran the same function from page load. Again it stopped after the debugger statement so I know it ran. However the two alerts didn't work in that case either. I can't tell why. It looks like the anonymous function is not running.
I didn't mention it last time because the first project you sent me seemed to be for webforms. It has an aspx page. The second project seemed to be mvc since I saw a views folder
Just to let you know I am working with webforms at the moment. And using VS2015. Is the fact I'm using webforms causing the anonymous function not to work?
You'll also notice that the "Fetch" mentioned in the overview page you listed in your last function is what I used in my code snippet at the very top of this thread. That snippet of javascript is what I would like to use, at least in theory.
Is there a more direct way to use the RadClientDataSource1 without linking it to other controls. Or should I forget about that since it won't work. Is this an issue of trying to do this with the Ajax UI controls and not kendo (which I know nothing about)? What can I try next? Do I need to leave those console.logs in the function and not use alerts (meaning that I would have to run the javascript in the javascript debugger I would assume).
Any help would be appreciated. If I need to go a more ordinary route, perhaps using a dataadapter and some sql strings please let me know. While I would like to use an api I figure if there is no simple solution to this I will have to go that route.
Thanks,
Neil