treeview in asp.net - c#

I want to use a treeview control in my asp.net project and when i drag and drop anything, it should update database. and there should be sort, when I change the sort when I drag and drop, the order column should be changed at the database.
(It is clear that treeview will get the items from database.)

I would search for examples of this via google to see what options are available with the standard .NET components, and 3rd party components (commercially purchased and jquery style plugins) See which one best fits your need and have a go at implemneting what you need. If you have further problems, let us know.

Related

Drag and drop tree view asp.net c# without third party control

I'm looking for ASP.NET TreeView drag and drop functionality without using a third party control. Can anyone guide me with JavaScript code?
This is not possible out of the box. Of course you could write your own drag & drop functionality, but the effort will be huge and you need to have very good JS and/or jQuery skills to do this.
I would prefer to using a third party JS/jQuery TreeView Control with Drag and Drop capabilities. So you will have less headache with using existing one also less error rate.

Multi-line ListView without third party component

is there a way to enhance .NET ListView control to capable to show two line items? I couldn't use third party libraries.
Thanx
There is no method to enhance the buil-in in list view control.
have you thought about creating a 'user control'? that for sure will allow you to dream up your own list view that would allow for multi line.
Regards

Create a list like the outlook 2010 inbox

I want to create a control that lists items, uses a collection of text and images in each item, can be scrolled though, titles given if re-ordered and can be selected.
The best example of this would be Microsoft Outlook 2010 inbox view with right reading pane.
I was hoping there would be something in the toolbox I could re-arrange to fit by needs? or would I have to build something myself? which would be a good challenge, but as I've not done this before I would like to avoid if I can.
There is no .Net FW control out of the box for you. Either look for open source control / build on your own. FYI: I know this can be easily done in WPF world though.
also check out TreeView and Custom TreeView for basic starters..
It would be easy to re-create if you didn't need it to be ordered. For an off the shelf solution that you may be able to customize to your liking you should check out the DataTables plugin for jQuery. http://datatables.net/

What are things/points to keep in mind while developing a reusable custom control?

Windows Form (in C#) - I need to create a custom listbox control for the following requirement:
There is a listbox with a long list of items. I want the user to be able to click in the list, and then start typing and have it automatically take them to the matching item (I call this "type ahead"). It needs to be able to do this for as many characters as they type that have a match.
This control should be really reusable without much changes.
What are things/points I should keep in mind while developing a reusable custom control? (if you provide a good pattern as a sample... will be more helpful)
In Real World scenario the first decision should be buy vs build. if your application is a serious one and not just for hobby and there is budget for it I would check some of those great controls collections like DevExpress or Telerik for WinForms. You would need a grid as well at some point, eventually, and surely your custom or framework one cannot compete theirs.
I refer to those libraries because i believe they already have a listbox with autocomplete as you described in your requirements. check the online demos on their websites...

Inserting multiple records with one click in Telerik mvc grid

I am working on a Telerik MVC grid. My requirement is to allow a user to insert multiple records into the grid. This should be done on the client side.
After entering several records in the grid, the user will click a button so that all the records are inserted into the database.
Is this possible with Telerik MVC grid?
Thanks in advance.
Here is a guide for doing a batch update from Telerik themselves: http://www.telerik.com/help/aspnet-ajax/grdperformingbatchupdates.html
Here is a demo using automatic operations to allow multi-row editing: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx
Here is another ticket which links to a demo from Telerik doing this type of thing: http://www.telerik.com/community/forums/aspnet-ajax/grid/339723-batch-insert.aspx
Bottom line: it can be done, but it isn't super easy and will require quite a bit of custom code. More than I am able to share here, but the above links (especially the last one) should provide you the resources you need.
Not supported out-of-the-box from the Telerik MVC grid extensions AFAIK, but it should be possible by making jQuery ajax or web service calls which add items in the source and bind the grid. And I recently heard that they crafted batch client edits/updates for the Q1 2011 release, due in mid March.
The latest release of Telerik MVC Grid supports what's called batch editing directly. Here is the documentation on how to use the new feature.

Categories