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. Image for the cookie policy date

Grid and ootb AddEdit screens

Hi, all.
Is it possible to use lightswitch out-of-the-box AddEdit screens with the grid control?
Regards, Carsten

5 Replies

RU Ragavee U S Syncfusion Team January 19, 2015 03:42 PM UTC

Hi Carsten

Currently we are working on your requirement to use lightswitch out-of-the-box AddEdit screen in grid control, for editing/adding a record to the grid. We are facing few complexities i.e, the fields are disabled while adding. So we will analyze and update you the response on Jan 20, 2015. We will appreciate your patience until then.

Thanks & Regards

Ragavee U S




RU Ragavee U S Syncfusion Team January 20, 2015 03:13 PM UTC

Hi Carsten

We regret for the inconvenience caused.

Since we are still facing complexity, while adding new record to the grid using the lightswitch out-of-the-box AddEdit Screen, we need some more time to analyze the issue. So we will update you the response on or before Jan 22, 2015. We will appreciate your patience until then.

Regards

Ragavee U S




AS Alan Sangeeth S Syncfusion Team January 23, 2015 03:58 AM UTC

Hi Carsten,

Thanks for your patience.

We are glad to let you know that we have achieved your requirement (“AddEdit screen in grid control, for editing/adding a record to the grid”) and the same can be downloaded from below link.

Sample: http://www.syncfusion.com/downloads/support/directtrac/117992/local-lightswitch1153915538.zip

In the above sample, on toolbar Add/Edit button click event we have prevented the default action and displayed Lightswitch AddEdit Screen and after saving the record in AddEdit Screen we have refreshed Grid to reflect the changes. Please refer the following code snippets.

itemTemplate.ejGrid(

            {

...

toolbarClick: function (args) {

                    switch (args.itemName) {

                        case "Add":

                            args.cancel = true; //Prevented default action

                            myapp.showScreen("AddEditTable1Item", null, {

                                beforeShown: function (addScreen) {

                                    var ord = new myapp.Table1Item();

                                    addScreen.Table1Item = ord;

                                }

                            });

                            break;

                        case "Edit":

                            if (!($.isEmptyObject(selectedData))) {

                                args.cancel = true; //Prevented default action

                                myapp.showScreen("AddEditTable1Item", [selectedData])

                            }

                            break;

                    }

                }

myapp.AddEditTable1Item.beforeApplyChanges = function (screen) {

    // Write code here.

    var obj = $("#Table1Item").ejGrid("instance");

    obj.refreshContent();

};

Please let us know if you need any further assistance.

Regards,
Alan Sangeeth S




CK Carsten Kreißl January 23, 2015 05:13 PM UTC

Hi.
Thanks a lot. I will give this a try!
Carsten


RU Ragavee U S Syncfusion Team January 27, 2015 08:50 AM UTC

Hi Carsten,

Thanks for your update.

Please try the sample and get back to us if you have any further queries. We will be happy to assist you.

Thanks & Regards

Ragavee U S



Loader.
Live Chat Icon For mobile
Up arrow icon