Showing posts with label Telerik. Show all posts
Showing posts with label Telerik. Show all posts

Wednesday, June 29, 2011

Telerik MVC Gymnastics

Just upgraded our MVC2 to MVC3 and took advantage of the OpenSource Telerik MVC controls once again. Thanks!!

I've got a AJAX Edit Grid displaying a mixture of text boxes, combobox and dropdown list. The final product will use the Batch Editing option
.Editable(editing => editing.Mode(GridEditMode.InCell))
but I'm not quite ready for that yet.

On the latest build I added some ClientEvents to the onEdit action. If I'm inserting a new record then I disable one combobox and set it's default value.

But if I'm editing an existing row then I disable a dropdown box.

Confusing I know. But it should make managing our race information easier than the page full of dropdown boxes we're dealing with now. The page load on that is between 2-15 mintues, all depending the number of records. Yes, you read that right. But some of the dropdowns are set to have about 13,000 entries. Yes that's awful!

The new setup using the Telerik control is calling back with AJAX and bring over just a handful of records. Much cleaner code and much happier users.

Thursday, December 23, 2010

Akamai - Sitecore and CCU Web Services

I just wrapped up work to integrate the Akamai Content Control Utility webservices and automatic purging from Sitecore.

Using the Telerik RadFileExplorer and some crafty C# code I am now able to trigger content purging from the Sitecore Desktop. Just created the service object, collected the parameters and called the webservice.

Pretty cool, I even get an email once the purge has been completed.

//create the purgeResult object
X.Web.Isc.UI.ServiceReference1.PurgeResult r = new X.Web.Isc.UI.ServiceReference1.PurgeResult();
X.Web.Isc.UI.ServiceReference1.PurgeApiClient a;

a = new X.Web.Isc.UI.ServiceReference1.PurgeApiClient();
string[] options = new string[4];
string[] uri = new string[1];

//get the login credential and other data for Akamai from the web.config
options[0] = ConfigurationManager.AppSettings["AkamaiCCUEmail"].ToString();
options[1] = ConfigurationManager.AppSettings["AkamaiCCUAction"].ToString();
options[2] = ConfigurationManager.AppSettings["AkamaiCCUType"].ToString();
options[3] = ConfigurationManager.AppSettings["AkamaiCCUDomain"].ToString();

//build the URL to the file that was uploaded

uri[0] = "http://www.mydomain.com" + e.Path;

//request the content purge
r = a.purgeRequest(ConfigurationManager.AppSettings["AkamaiCCUUserName"].ToString(), ConfigurationManager.AppSettings["AkamaiCCUPassword"].ToString(), "", options, uri);

//log the activity
X.Web.Core.Context.Current.LogMessage("Akamai CCU WebService Message: " + r.resultCode + " " + r.resultMsg + " " + r.sessionID + " " + uri[0].ToString());

}
catch (Exception ex)
{
//something didn't work so let's report the issue
X.Web.Core.Context.Current.LogMessage("Error Akamai CCU WebService Message: ", ex);
}