ExternalClientScripts - Using a embedded resource
In the products sample, in the ProductsDefinitions.cs file, there is a method "ExternalClientScripts" of "productsGridView" that takes an external script as input.
Since this is a static class of definitions how would you specify an embedded resource?
Hi Victor,
Try to use the following code:
var externalScripts =
new
Dictionary<
string
,
string
>();
externalScripts.Add(
"YourModule.Resources.MasterListViewExtensions.js, YourModule"
,
"OnMasterViewLoaded"
);
productsGridView.ExternalClientScripts = externalScripts;
// called by the MasterGridView when it is loaded
function
OnMasterViewLoaded(sender, args)
//your code here
Genius!
Thanks, it worked perfectly.