Filling GridView on some Button Click in MVC - c#

I am working on some project which is in classic ASP.NET, but I need to migarate that into MVC
Right Now I am having a page with one button and gridview which get fill on clicking the button. Gridview has the functionality like EDIT, DELETE, Paging, OnRowCommand Event.
How should I perform this page through MVC. I know gridview can't be used in MVC, so what's the alternative of that.
Thanks

Consider using a jQuery Grid plugin, like this one. I assume you have already figured out how to populate your view with data, etc.

I would recommend the Telerik MVC Grid Control. They are free and open source, and I am using these at the moment and don't have a bad thing to say about them!
http://demos.telerik.com/aspnet-mvc/grid/editingajax

Here I found the perfect answer for me
http://blog.maartenballiauw.be/post/2008/06/Code-based-ASPNET-MVC-GridView.aspx
It works good for me clearlly understandable for me, I would say #amarsuperstar example also looks fine but not looks for beginners

Related

Edit database directly with gridView ASP.NET

We're having problems with editing a database with a gridView. I've been looking around and I've seen that there are some options in the properties to put an edit link next to the gridView. I've also seen the sqlDataSource Control, which seems to be a little too complicated for me. A user needs to be able to see the database content in the gridView, then be able to edit the content and clicking submit which updates the database with the changed content.
Is there any simple way to do this?
If not, any other suggestions?
Thanks in advance!

How to create a Dropdown button in asp.net c#?

Does anyone know the name of the property in which it look alike button
but once if we keep the mouse pointer
on it then it will show like dropdown
list options.
I want to use that in my asp.net
project.
There is no out of the box control as such. It is an effect achieved either using javascript or CSS
Take a look at this example
http://demos.9lessons.info/DropMenu/MyDemo.html
You should also search for jquery plugins for this. Though you will get readymade code for it but it will surely not be a server side control. You have choice of either creating a user control or just use it as it is.
unfortunately there is no such control out of the box in asp.net. you might want to look at third party controls or do some css magic.
Something like that maybe a standart one(1) .But I can recommend you to use telerik if you are using it already here is a example (2)
Example2
Example2

Implement and editable label?

I would like to present a user with a normal screen with a few fields (Description, Date etc). But I would like them to click the label and without a postback (visible) the label becomes editable, and a 'Save' button appears somewhere.
Once they click save, the data gets saved, and the edit boxes turn back into labels.
Is there a way to implement this?
ASP.Net being used.
There are quite a few edit in place plugins for jQuery. Using one will help you get up and running quickly.
Jeditable is one of the more mature and popular of such plugins. You can find help specifically for using Jeditable with ASP.Net.
Why can't you just use an edit box, and toggle either readonly or enabled?

ReBind Telerik RadGrid from RadToolBarButton +AJAX

I've been using Telerik Controls for a couple months now, and have yet to apply AJAX to any of my UserControls. While I've been learning, I've been doing full Postback's every time I need to Update a RadGrid or insert data. After getting my Web App looking the way I want it, I've realized that doing full Postback's not only looks bad, but it is quite slow.
At the moment all I am looking to do is ReBind a RadGrid using a refresh button on a RadToolBar. I am sure that once I grasp this, I will be able to apply AJAX to other places on my page.
I am currently running a Master Page, which consists of my Main Page, and my Main Page holds a RadTabStrip linked to a few other UserControls.
Does anyone know of any good (basic) tutorials that will aid me in learning AJAX with Telerik, as I am unfamiliar with both AJAX and Java, but am open to learning...
I recently run up into series of blog posts about AJAX and telerik ajax on their blogs - you can read them here. Also I know about a demo that does what you are asking for - toolbar incorporated into grid's command item, check it out.

Asp.Net Wizard in ASPxCallBackPanel control

Im using ASPxPopUpControll in which I have ASPxCallBack panel. THis CallbackPanel was embeded there because I wanted to have solution based on callbacks despite of reloading page each time.
In this CallBackPanel I've embeded asp:Wizard control.
What I want to achive is get rid of postbacks after clicking next previous etc buttons in this wizzard.
Any hints?
Maybe there is other way to create nice wizard without any postbacks ?
thanks for help
The ASPxCallbackPanel cannot intercept postbacks and "convert" them to callbacks as the MS UpdatePanel does this. So, a possible solution is to replace the ASPxCallbackPanel with the MS UpdatePanel and use the Wizard inside it. One more solution is to use the ASPxPageControl, position all required controls in its Pages and manage them manually.
I would recommend looking into ajax and jquery for asynchronous postbacks, that way you don't get a page refresh and you would only need to update a smaller part of the ui.

Categories