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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there a way to decrypt and bind the datasource to EJ grid?

Thread ID:





121608 Jan 7,2016 05:13 AM UTC Jan 8,2016 11:38 AM UTC ASP.NET MVC 1
Tags: Grid
Ashok Bhupathy
Asked On January 7, 2016 05:13 AM UTC


Is there a way to decrypt and bind the datasource to EJ grid, some of my database columns like dob are encrypted with MACTripleDES, how do we decrypt and bind that to ej grid?

var datasource;
ViewBag.datasource = DataSource.ToList();
return View();

Balaji Marimuthu [Syncfusion]
Replied On January 8, 2016 11:38 AM UTC

Hi Ashok,

Thanks for contacting Syncfusion support.

To bind the decrypted dataSource in Grid, you need to decrypt it and bind the list of dataSource to the Grid. Please refer to the online link for encrypt & decrypt the data.


Refer to the code example as below.


  var encrypteddata = new NorthwindDataContext().Orders.Take(10).ToList();


            List<Order> decryptordertable = new List<Order>();

            foreach (var id in encrypteddata)


                dynamic obj = id;

                decryptordertable.Add(new Order()


                    OrderID = obj.OrderID,

                    EmployeeID = obj.EmployeeID,

                   CustomerID = Decrypt(obj.CustomerID, true),

                    Freight = obj.Freight,

                    ShipCity = obj.ShipCity


   ViewBag.datasource = decryptordertable;





If we misunderstood your requirement, please share more information that will be helpful to provide a better solution at the earliest.

Balaji Marimuthu


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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