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

dropdown issue in ejgrid inline editing

Thread ID:

Created:

Updated:

Platform:

Replies:

118694 Apr 1,2015 05:21 AM UTC Jan 18,2017 01:24 PM UTC JavaScript 4
loading
Tags: ejGrid
kumar
Asked On April 1, 2015 05:21 AM UTC

When we specify edittype for a column in ejgrid as Dropdown , after editing record the value is shown in grid instead of text

in the below senario once i click on edit button the customers dropdown is shown with the customers list but after selecting any customer and click on save then the value of selected customer is shown in grid instead of text.


[Default]

  <ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" >

          

            <Columns>

                <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true"TextAlign="Right" Width="90"/>

                <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="90"EditType="Dropdown" />

               

              . . . . . . .

           </Columns>

           

        </ej:Grid>

[Default.aspx]

        List<Customer> customers = new List<Customer>();

        protected void Page_Load(object sender, EventArgs e)

        {

            customers.Add(new Customer() { text = "Andreas", value = "123" });

            customers.Add(new Customer() { text = "Frank" ,  value = "124" });

            customers.Add(new Customer() { text = "Willi" ,  value = "125" });

            customers.Add(new Customer() { text = "Horst" ,  value = "126" });

            customers.Add(new Customer() { text = "Manfred",  value = "127" });

            BindDataSource();            

        }

        private void BindDataSource()

        {

            

            . . . . . . .           

           this.OrdersGrid.DataSource = order;

            var index = this.OrdersGrid.Columns.FindIndex(col => col.Field =="CustomerID");

            this.OrdersGrid.Columns.ElementAt(index).DataSource = customers;

       

            this.OrdersGrid.DataBind();

        }

        [Serializable]

        public class Customer

        {

            public Customer()

            {

            }

            public Customer(string text, string value)

            {

                this.text = text;

                this.value = value;

            }

            public string text { getset; }

            public string value { getset; }

        }

    }


Prasanna Kumar Viswanathan [Syncfusion]
Replied On April 2, 2015 02:05 PM UTC

Hi Kumar,

Thanks for using Syncfusion Products

We considered this requirement “Editing is not working fine while set dataSource for dropdown” as a bug and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Regards,

Prasanna Kumar N.S.V


Prasanna Kumar Viswanathan [Syncfusion]
Replied On April 10, 2015 12:55 PM UTC

Hi Kumar,

Please ignore the previous update,

We considered the requirement “Editing is not working fine while set dataSource for dropdown” as a bug. We have logged a defectreport on this and will fix the issue internally, also the fix will be included in 2015 Volume 1 Service Pack 1 Release, which has been scheduled to be rolled out in the month of April 2015.

We have also created an incident internally to have a follow up with this issue.

Regards,

Prasanna Kumar N.S.V


Matt Abercrombie
Replied On January 17, 2017 07:07 PM UTC

I am encountering the same problem using just the JavaScript library. When not in edit mode, the grid shows the value. When in edit mode, it shows the drop down list with the appropriate text selected.

I am having trouble finding sufficient documentation on resolving the issue. If documentation already exists, please point me to it.

Prasanna Kumar Viswanathan [Syncfusion]
Replied On January 18, 2017 01:24 PM UTC

Hi Matt, 

We regret for the inconvenience. 

We can reproduce the mentioned behavior with the latest version. In 13.1.0.26  we fixed the issue with “Editing is not working fine while set dataSource for dropdown” and due to this fix we face other issues in dropdown, so we reverted the mentioned fix in 13.1.0.30.    

Your requirement have been achieved using Foreign Key column. In this we can able to bind the datasource for the foreign key column. In the foreignKey field that we have to mention the field(EmployeeID) and in the ForeignKey value we have to mention the text(FirstName). When the grid is not in edit mode, it displays the text value. After editing the record, when we saving to the database the value can be saved and text will be shown in grid.  

For your convenience we attached a sample in JSPlayGround. 


Refer to the Help document for the ForeignKey column.  


Regards, 
Prasanna Kumar N.S.V 
 


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

;