We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MVC Grid sample with expanded row showing an edit panel.

Thread ID:

Created:

Updated:

Platform:

Replies:

121943 Feb 10,2016 04:20 PM UTC Feb 16,2016 04:24 AM UTC ASP.NET MVC 6
loading
Tags: Grid
ANIL Goindi
Asked On February 10, 2016 04:20 PM UTC

Hi,

With reference to the sample shown in http://help.syncfusion.com/aspnetmvc-classic/grid/overview to you have sample of this MVC grid exactly as shown whereby a user click on the row and his details appear for editing etc? This looks like a great feature. Your advice is appreciated.

I have not used the grid yet but wish to do so.

Regards,
Anil

ANIL Goindi
Replied On February 10, 2016 04:25 PM UTC

Also, what is the difference between classic MVC Grid and MVC Grid?

Regards,
Anil

Ragavee U S [Syncfusion]
Replied On February 11, 2016 12:47 PM UTC

Hi Anil,

Query #1: sample of MVC grid exactly whereby a user click on the row and his details appear for editing etc?

We can use “InlineForm” EditMode of MVC Grid to achieve the same Classic MVC Gird editing shown in the provided link. In InlineForm editing, the edit form will append to current edited row.

API Reference Link: http://help.syncfusion.com/js/api/ejgrid#members:editsettings-editmode

Online documentation link: http://help.syncfusion.com/aspnetmvc/grid/editing#inline-form

Online Sample Link: http://mvc.syncfusion.com/demos/web/grid/inlineformediting

Query #2: I have not used the grid yet but wish to do so.

Please refer to the below Getting started documentation in order to create a project in EJMVC platform.

http://help.syncfusion.com/aspnetmvc/getting-started

Getting Started for Grid control: http://help.syncfusion.com/aspnetmvc/grid/getting-started

Query #3: what is the difference between classic MVC Grid and MVC Grid?

The newer version of “Essential Studio for ASP.NET MVC (EJMVC)” includes most of the features from MVC classic version, and provides several advantages over the classic version. We have listed some of major difference in the below table.

The new suite of ASP.NET MVC controls are client side rendering of HTML5/JavaScript controls, so it has lightweight controls. It offers better performance and better support for touch interactivity.

Feature And Functions
ASP.Net MVC(Classic)
ASP.Net MVC(EJMVC)
Control Rendering
Rendering in Server side.
Rendering in Client side.
Third party support (like Angular JS, Knock out JS)
Not Available.
Available.
Element Type
Normal HTML Elements.
HTML and HTML5 Elements.
Compatible with Bootstrap CSS
No.
Yes.
Full-fledged Touch support
Not Available.
Available, because it’s compatible with Mobile device.
Localization Support
Available.
Available.
Client Side API’s
Available.
More API’s Available than Classic controls.
RTL support
Available.
Available.
Theming support
Available, multiple themes like Classic Olive, Image Blue, Black, Vista, Office2007 Black, etc.
Have theme studio support for custom themes.
Available, we have provided twelve variants, which includes both light and dark variations.
Also have theme studio support for customizing themes.
 
Performance
Good One
Better than Classic controls.
Responsive control
No, It won’t.
Yes, compatible with both mobile and desktop.

For your convenience, we have prepared a comparison report for MVC classic Grid and EJMVC Grid, which can be downloaded from the below location.

http://www.syncfusion.com/downloads/support/forum/121943/ze/Classic_&_Non_Classic_MVC-_Comparison2103275162

Regards,
Ragavee U S.

ANIL Goindi
Replied On February 12, 2016 09:49 AM UTC

Hi Ragavee,

Thank you very much for the information it is helpful. The controls look clean great.

I have one question with regard to http://mvc.syncfusion.com/demos/web/grid/inlineformediting, i.e. "Inlineformediting" sample and specifically the sample C# "controller" code below which I have simply copied below for your reference:

namespace MVCSampleBrowser.Controllers
{
    public partial class GridController : Controller
    {
        //
        // GET: /InlineFormEditing/

        public ActionResult InlineFormEditing()
        {
            var DataSource = new NorthwindDataContext().OrdersViews.ToList();
            ViewBag.datasource = DataSource;
            return View();
        }

        public ActionResult InlineUpdate(EditableOrder value)
        {
            OrderRepository.Update(value);
            var data = OrderRepository.GetAllRecords();
            return Json(value, JsonRequestBehavior.AllowGet);
        }

        public ActionResult InlineInsert(EditableOrder value)
        {
            OrderRepository.Add(value);
            var data = OrderRepository.GetAllRecords();
            return Json(value, JsonRequestBehavior.AllowGet);
        }

        public ActionResult InlineDelete(int key)
        {
            OrderRepository.Delete(key);
            var data = OrderRepository.GetAllRecords();
            return Json(data, JsonRequestBehavior.AllowGet);
        }

    }
}

[MY QUESTION IS >>] Why is there no [HttpPost] attributes above for the InlineForm when the "Save" button is selected for example after user data has to be saved for postback? Or is this handled under the hood? Perhaps I am missing something?

Regards,
Anil


Ragavee U S [Syncfusion]
Replied On February 15, 2016 09:44 AM UTC

Hi Anil,

Thanks for your appreciation.

The Controller action will be triggered for both GET and POST requests. In our Online samples, we haven’t defined the HttpPost action since the action will be triggered anyways. If you want the action to be triggered only during POST action, then we suggest you to define the attribute for the controller action as in the below code example.

[HttpPost]

public ActionResult InlineUpdate(EditableOrder value)

{

    OrderRepository.Update(value);

    var data = OrderRepository.GetAllRecords();

    return Json(value, JsonRequestBehavior.AllowGet);
}


Regards,
Ragavee U S.

ANIL Goindi
Replied On February 15, 2016 10:20 AM UTC

Thanks Ragavee, you may close this query.

Regards,
Anil

Ragavee U S [Syncfusion]
Replied On February 16, 2016 04:24 AM UTC

Hi Anil,

Thanks for your update.

We are happy that your requirements are met.

Regards,
Ragavee U S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;