Drag and drop functionality of Radscheduler control with MVC - model-view-controller

I have added telerik's rad-scheduler control for my MVC application.I have to apply the drag and drop functionality with the scheduler.I can see thet its already with the AJAX .How can i incorporate with my MVC application.I am new in MVC.Please provide a step by step solution.It will very helpful for me.
Thanks

Use OnClientAppointmentMoveStart funntion on your javascript.
function OnClientAppointmenMoving(sender, eventArgs){
//your code.
}
and refer it in your radcontrol in HTML.

Related

using client side validation with telerik controls

Can you use client side validation with telerik controls? The examples show validation using standard html input controls. I have forms with RadTextBoxes, RadComboboxes etc and would like to add validation.
You can access the Telerik client-side api by using
var ctrl = $find('<%= txtSomeTextBox.ClientID %>');
then you can get the current value of the textbox by calling the .get_value() function. Use your browser's debug tool to see which methods are available in the object that is returned or consult Telerik's help site.
Go to Telerik's online demos: http://demos.telerik.com/aspnet-ajax/input/examples/common/validation/defaultcs.aspx and you will find examples for almost anything. This one shows how to use the built-in client-side validation with the RadControls for ASP.NET AJAX.

KendoGrid with in a new custom kendo ui widget

Please guide me how to make a custom kendo ui widget, like if you could refer to some tutorial or anything. Secondly the main question is that I want to use kendo grid to consume webapi and i want to use it in a widget in which and pass the datasource to this widget.
Bascially I want to make a widget which will consume the webapi using a particular url, and which will return a data source that I can add to this kendogrid widget.
Googling a little I just found:
Creating Custom Kendo UI Plugins
Creating a DataSource Aware Kendo UI Widget
Inheriting From Custom Widgets
Creating A Kendo UI MVVM Widget
I think that any and all this blogs should help you (I've written several widget and I found here all I needed).
In addition to #Emiliano's links, the Kendo Music Store demo app also contains a custom Widget bound to a DataSource that you can look at as an example:
Live demo site: http://www.kendouimusicstore.com/
Source code: https://github.com/telerik/kendo-music-store
Custom Widget source: MvcMusicStore/Scripts/App/kendo-cart-menu-widget.js
Documentation for this custom widget: http://docs.kendoui.com/tutorials/ASP.NET/Kendo%20Music%20Store/Music%20Store%20Web/kendo-music-store-web-cart-menu-widget
If you are going to use WebAPI, you will probably want to read this (The Facts On Using Kendo UI With ASP.NET WebAPI) first.
"Use WebApi" is a very broad statement, and narrowing down your approach would be the first step.

Custom button in Edit form that displays result

I am fairly new to .NET and MVC3 - and even Ajax and Json, and am working on an MVC3 (razor) application, using jqGrid, and so far it is immense(jqgrid that is!) and has dealt with everything I have thrown at it.
However, I have One Outstanding peice of functionality that I do not know How to accomplish.
Within the Edit form of a Row, I have Placed a Custom button called 'Reset Password'. I need the Onclick Event to call a piece of functionality in my Controller to go through some logic, generate a Password, and Return the new Password to the Screen.
Can anyone tell me How can I achieve this?
May thanks in Advance.
You can return a partial view result or json data from the action.
See the partial view approach here

Events in ASP.Net MVC

I read that there aren't events in ASP.Net MVC.
However, I added button and when I double click it a buttonClick event was made.
So, are there events in Asp.Net MVC or not?
That is because you are using the webforms view engine. This view engine includes all the page life cycle stuff from the webforms framework. That means that you can, theoretically, use anything from webforms in asp.net mvc if you are using the webforms view engine. However, I'd strongly suggest that you don't do that. You will miss out on all the advantages with asp.net mvc and you'd be better of just using webforms in the first place.
If you are new to asp.net mvc I'd suggest that you'd use another viewengine instead as that will help you learn the framework a lot better and faster. There is a viewengine from Microsoft called Razor that you could start with.
If you're seeing a buttonClick event handler created when you double-click a button, you are likely attempting to use the Button server control. Instead you should simply include an <input type="submit" value="Button Text" /> element within a <form>. The form's action will result in the controller's action method being called on the subsequent post request.
I highly suggest that you do some do some research on ASP.NET MVC. There are several good resources, but here's a short introductory video to start with:
http://www.asp.net/mvc/videos/mvc-2/how-do-i/5-minute-introduction-to-aspnet-mvc
There are not server control events like there are in webforms. There are jQuery and javascript events that can happen in the HTML/DOM though.
If you double clicked a button on a designer canvas in visual studio, and it created a button click method in another file with a signature like public void MyEvent(EventArgs e), then you are not working with an MVC project.

Ajax vb.net treeview

I want to implement a treeview in my project using vb.net and ajax.
im using a gridview to fetch and show the data. and i want to implement the treeview inside the grid.
its like the name of a person is shown in the gridview and when i click the plus sign or anything next to it it expands with its details. im using sql for retriving the datas.
can anyone provide me any examples? or suggest any sites where i can download any sample code for this?
thanks in advance.
A tree view is normally "folder view" which can be found here
But my suggestion is you use accordion. You can find accordion example here..
Jquery Accordion
Sandbox Accordion
I shall recommend Jquery. You can customize it and write code to load the content on expanding the item, event to write your code is , change event of the Jquery Accordion.

Resources