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

How to clean edit cell list and autocomplete with 2 values?

Thread ID:

Created:

Updated:

Platform:

Replies:

140982 Nov 16,2018 06:01 PM UTC Nov 19,2018 06:45 AM UTC ASP.NET Web Forms 1
loading
Tags: Grid
César Alejandro Guerrero Nava
Asked On November 16, 2018 06:01 PM UTC

Hi syncfusion workers, its a pleasure contact with you again.

The last time you solved my problem, thank you very much. But this time, I have two questions:

1.- I have a grid, in which only one column is edited (with the batch mode option). Then, when I write on the edited cell, appears a list with all the values than I use previously. Is there a form to prevent that that list shows?

2.- In the same field I am going to develop an autocomplete with the names of the articles in my inventory. The question is: Is there a form than when the autocomplete brings the names of the articles its shows the existence of the article in the same line. ?  Something like this:

Write: Filter:

Options:

Oil filter 5
Water filter 2
Air filter 1

Please, I need help. 

Thank you so much, have a nice weekend.

Vignesh Natarajan [Syncfusion]
Replied On November 19, 2018 06:45 AM UTC

Hi César, 
 
Thanks for contacting Syncfusion Support. 
 
Query#1:- I have a grid, in which only one column is edited (with the batch mode option). Then, when I write on the edited cell, appears a list with all the values than I use previously. Is there a form to prevent that that list shows? 
 
We have checked your query and we suspect that you need to prevent default pop-up while editing a cell. To prevent that list, we suggest you to use AutoComplete control in EditTemplate on the particular Field. From this you can avoid the previously searched values being displayed. By using EditTemplate property we can render any other control(Eg: textarea /colorpicker/dropdown/autocomplete/) in Grid column. 
 
Query#2:- In the same field I am going to develop an autocomplete with the names of the articles in my inventory. The question is: Is there a form than when the autocomplete brings the names of the articles its shows the existence of the article in the same line. ?   
 
If you want to filter the value with the existence of the article in the same line you can use filterType property of the autoComplete as “contains”. Please refer to the code example:- 
 
<ej:Grid ID="FlatGrid" runat="server" AllowPaging="true"> 
      <ToolbarSettings ShowToolbar="true" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings> 
         <EditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" EditMode="Batch"></EditSettings> 
      <ClientSideEvents ActionComplete="complete" /> 
        <Columns> 
            <ej:Column Field="OrderID" IsPrimaryKey="true" HeaderText="Order ID" /> 
            <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="120"> 
                    <EditTemplate Create="create" Read="read" Write="write" /> 
                </ej:Column> 
        </Columns> 
    </ej:Grid> 
 
     <script type="text/javascript">        
        function create() { 
            return $("<input>"); 
        } 
 
        function write(args) { 
            obj = $('#<%= FlatGrid.ClientID %>').ejGrid('instance'); 
            var data = ej.DataManager(obj.model.dataSource).executeLocal(new ej.Query().select("CustomerID")); 
            args.element.ejAutocomplete({ width: "100%", dataSource: data, filterType: 'contains',enableDistinct: true, value: args.rowdata !== undefined ? args.rowdata["CustomerID"] : "" }); 
        } 
 
        function read(args) { 
            args.ejAutocomplete('suggestionList').css('display', 'none'); 
            return args.ejAutocomplete("getValue"); 
        } 
    </script> 
     
 
 
For your convenience we have prepared a sample which can be downloaded from below link 
 
 
  
Please refer our UG documentation for your reference 
  
 
 
 
 
 
Please get back to us if you have further queries. 
 
 
Regards, 
Vignesh Natarajan 
 


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.

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

;