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
close icon

Custom Drop down selects the text in the cell

Hi,
 I am facing issue regarding custom drop down.

// Registering the cell model

this.grid.Model.CellModels.Add("CustomDropDown"new CustomeDropDownCellModel());

 

// Binding the celltype

var dropdown1 = this.grid.Model[7, 2];

dropdown1.CellType = "CustomDropDown";

dropdown1.ItemsSource = GenerateListBoxContent();

dropdown1.DisplayMember = "Text";

dropdown1.DropDownStyle = GridDropDownStyle.AutoComplete;



On changing or selecting the excel cell , by default selects the text in the cell.

I do not want cell text to be selected first time when cell is clicked or dropdown in changed.

Note : I need Autocomplete feature to working.

and also I noticed if dropdown1.CellType = "ComboBox"  above issue is not observed,

Its present only with CustomdropDown.


Any help is appreciated,

Please find the image attached for issue;



Attachment: CustomDropdown_f9d61ce5.zip

1 Reply

DK Deepak Kumar Nandagopal Syncfusion Team April 7, 2015 12:39 PM UTC

Hi Basavaraj,


Thank you for contacting Syncfusion Support.


We analyzed your requirement and we have prepared a sample by overriding the close() method of theGridCellDropDownControlBase class in CustomeDropDown class in which we have selected the text after the dropdown is changed. Now, it has been modified according to your requirement as shown in the following code example:


Code Snippet:

public override void Close()

{

if (this.IsDropDownOpen)

{

if (this.IsDropDownOpen)

{

this.IsDropDownOpen = false;

}

}

}


Please find the modified sample from the below location for your reference.


Sample Location: http://www.syncfusion.com/downloads/support/forum/118721/CustomDropDown-1589232872.zip


Please let us know if this solution helps you.


Regards,
Deepak Kumar N


Loader.
Live Chat Icon For mobile
Up arrow icon