Ajax vb.net treeview - ajax

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.

Related

ASP .NET MVC3 Razor Popup View

I am new to web development..
i have created views using Entity Framework in MVC3 Razor..
What i have done yet is,
i 1st created model(Clients) and DbContext(ClientDbContext) Classes.
then, i add controller with scaffolfind options
Template: Controller with read/Write actions and View, Using Entity Framework
Model Class: Clients
Data Context Class : ClientDbContext
Views : Razor(CSHTML)
It Creates the controller class and index, Detail, Delete, Delete Views...
After that i modified the index page for search and pagination...
All are working good...
in the index page i have create, edit, delete, detail links...
When i click the links browser loads to that page and working good...
But i need to popup those views when i click the links in the index page...
i don't know how to do this... i studied many articles but i am confused...
Please help me to solve this with an efficient manner...
Thanks in advance...
Creating a model pop-up within a page isn't something that can be done directly with ASP.NET MVC. You could do it yourself using javascript & css but I would strongly recommend using a JS UI framework to do this. jQuery UI has a pop-up modal box, except they call it a dialog.
The docs for jQuery UI's dialog can be found here. Have a look through the examples to see the fine details of how to set it up. But this is the basic flow of what you need to do:
Download the jQuery UI files needed and include them on your page (CSS/JS files)
Take the html from your create/update/delete views and put it on your index page, wrap them in a div with an appropriate id
When the page loads use jquery ui to target your div's you want to be a popup
Things such as the link you want to make a dialog popup is set by passing options to the dialog initialize method, again the exact options and examples can be found on the docs page.
Refer this : http://jqueryui.com/dialog/ to create a jQuery Dialog box.
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
<div id="dialog">
#using(Html.BeginForm()){
#Html.EditorForModel()
<input type='submit' value ='Submit'/>
}
</div>

How to add custom forms in FullCalendar?

I have created forms in HTML (shown image below), and I want to integrate this form in FullCalendar. This form will show when I wanted to add new event. Can you give me some idea? If possible, can I do this without modifying the plugin?
You could put the form in a lightbox and show it, when the user clicks on a day. Fullcalendar provides an event for this: http://arshaw.com/fullcalendar/docs/mouse/dayClick/
Edit: Or what exactly do you mean by integrate?

Image button inside a Data table

I'm facing a scenario that i need to add image button inside a datatable. Is it possible to add an image button control inside a datatable.
I'm using Framework 3.5 and C# language.
Thanks In Advance!
Regards,
Ranga
I think you are trying to work with a user interface control like a DataGrid or DataGridView. DataTable is an ADO.NET class for holding data from a database. It doesn't present data in a user interface, so adding an image button maes no sense.
I presume you're working with a grid of some sort, but in order to get a sensible answer you need to tell us which one. Is your user interface WPF, Windows Forms, or ASP.NET? Specifically, which grid class are you trying to use?

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.

facebook wall-like ajax in yii's zii widget list

I'm very new to yii, and I'm trying to integrate the facebook-wall-like style into my post list.
In short, I just want to add a "Load More" with ajax to load more posts at the bottom of the post list.
I know how to write ajax or html, but I don't know how to integrate this style into yii.
I'v tried the zii.widgets.CListView/CDetailView.. but I can't find ways to add ajax.
If there's anyone who knows the how-to, please share it with me.
Thanks!
Take a look at this extension, it is a pager that adds infinite scroll like in twitter - when you get to the bottom of the page it loads more content via ajax. If you prefer to load more only once a button is pressed, i'm sure it's just a matter of overriding the button's onclick event.

Resources