use Telerik controls in Orchard CMS - asp.net-mvc-3

I am trying to use the Telerik datetimepicker in my own module of Orchard CMS.
everything seems working well except javascript. the datetimepicker control is unable to show the drop-down calendar.
I tried to use
Script.Include("~/Themes/Contoso/Scripts/2011.2.712/telerik.common.min.js").AtFoot();
Script.Include("~/Themes/Contoso/Scripts/2011.2.712/telerik.datetimepicker.min.js").AtFoot();
or created an ResourceManifest.cs in my module and called followings.
Script.Require("telerik_datepicker").AtFoot();
Script.Require("telerik_calendar").AtFoot();
I can see no run time errors against scripts i am refereing. but no document.ready() stuff in the html source for the page.
I dont know where got wrong. hope someone can crack the problems . thank you in advance.

All Telerik UI components for ASP.NET MVC require a ScriptRegistrar in order to work properly. The latter outputs the required JavaScript files as well as the JavaScript initialization code. You are probably missing a ScriptRegistrar hence the DatePicker does not work. Here is the minimum required code:
#(Html.Telerik().DatePicker()
.Name("DatePicker")
)
#(Html.Telerik().ScriptRegistrar())

Don't those Telerik helpers rely on some kind of HttpModule that you'd need to register in the global config?

Related

Contactform7 not working

My contact7 form is not working, none of the functionality is working, tha ajax and after post validation aren't working. I checked the console for a conflict but there's none. The html is the same i've used on other forms.
This is my form:
disennio.com/clients/lunata/reservaciones/
Looks like you are trying to manually insert the form code on your page. Instead, you'll need to use Contact Form 7's insert a form feature while you are editing that particular page in the WordPress dashboard.
It was mobile plugin related issue, will find another solution for mobile validations. Sorry.

MVC3 AjaxHelper choosing selected DDL values without custom javascript

I'm creating a site where I don't want anything to be done via custom javascript/jquery code at all, and I'm not sure it's going to be possible so need some advice.
The things that I want to be able to do are:
Load a JQuery (or Jquery style) dialog box containing a partial view.
Have a button that will select the "SelectedValue" from a dropdown list and render a partial view. (e.g. select a user from a dropdown and then click a button to add them to a list)
Append a partial view to an existing div.
I'm sure that all the above can be done using custom javascript, but what I want to is to use the standard Ajax and Html helpers that come with MVC3.
Main reason is that I've been struggling to get to grips with jQuery, but I also thought it would be nice to see if it can all be done without having to add a new script to the site.
As always, any help is greatly appreciated (even if it's just pointing me to articles).
The standard Ajax and Html helpers that come with MVC3 are for handling server-side stuff. Even the #Html.ValidationMessageFor helper usually uses their unobtrusive validation lib for jQuery validate.
Keep trying at jQuery, you'll get it. There is a reason it is so popular!
Update
I believe you can do #3 using #Ajax.ActionLink, but don't think you can do 1 or 2 out of the box with the Ajax html helper.
It seems that you can use the Ajax.BeginForm method to do this.
There are issues with the fact that it has been in a separate form as I can't nest the forms though.

Yii ajaxlink in partial

I'm using Yii framework and have small problem.
Then I include to the partial CHtml::ajaxLink, link stopping work as ajax, standart click is raised and performs redirect to another page.
Can anyone help me? Thanks.
Just a supposition, but turn processOutput on when using partialRender with javascript. It's the fourth parameter when calling renderPartial:
$this->renderPartial('_view',array(params...),false,true)
ProcessOutput allows you to also load javascript when rendering with asynchronous calls or other stuff.
Turn firebug on and check for js errors. If there are any, post them here
There was something wrong with yii CHtml::ajax implementation, and it caused me similar bug to yours.
Maybe you not finishing document right?
try with:
Yii::app()->end();
And check differences in generated HTML between old version (which worked) and this one.
Maybe some js lib not included?

How do I get a reference to "Microsoft.Web.Preview" to resolve?

I'm trying to include a validator on a form launched by the ModalPopupExtender control found in the AJAX toolkit. This is an ASP.Net 2.0 web application.
Several articles that show how to do this, include this reference:
<asp:ScriptReference Assembly="Microsoft.Web.Preview"Name="PreviewScript.js" />
This is the article I've based my page on for testing. http://usefulaspnet.blogspot.com/2007/03/modal-popup-with-textbox-and-validator.html
The problem I'm running into is that the file cannot be found when the page tryies to open.
Is there a better way to do what I want
Where can I find this file?
It turns out #1 is the correct answer.
All I had to do was make sure that the validators in the popup all were in the same validation group.

iGoogle style dashboard using jquery

Is there any jquery plugin for implementing iGoogle style dashboard? So basically drag n drop style etc.
Thanks
I recently found this:
http://www.webappers.com/2008/11/19/how-to-create-igoogle-interface-with-jquery/
Hope that helps...
Take a look at the jQuery UI portlet demo for Sortable.
If you are looking for a similar dashboard framework, please check out my implementation of igoogle style dashboard called 'sDashboard' : http://modeln.github.com/sDashboard/
This plugin, helps in converting an array of widget definitions into a dashboard, were each object in the array gets rendered as a dashboard widget.
Its has some neat features to render table and charting widgets and is highly configurable. The documentation page includes a link to a demo application & example usages to render different styled widgets.
Check out my implementation of an iGoogle style Dashboard using jQuery.

Resources