- Home
- Forum
- ASP.NET Web Forms
- Autocomplete bind text and code
Autocomplete bind text and code
List<Countries> c = new List<Countries>();
c.Add(new Countries { text = "Austria", ID = "100001" });
c.Add(new Countries { text = "Australia", ID = "20002" });
c.Add(new Countries { text = "Bangladesh", ID = "300003" });
this.categoryGrouping.DataSource = c;
categoryGrouping.DataTextField = "text";
categoryGrouping.DataUniqueKeyField
= "ID";
categoryGrouping.DataBind();
[Serializable]
class Countries
{
public string text;
public string ID;
}
protected void Button1_Click(object sender, EventArgs e)
{
string txt = categoryGrouping.DataTextField.ToString();
string code = categoryGrouping.DataUniqueKeyField.ToString();
}
Pratheep
Attachment: Autocomplete_7fdc507c.rar
Narayanasamy P
We were Unable to reproduce your issue with autocomplete sample which we have shared. We have attached a video sample for your reference. Please find the video sample in the following link: http://www.syncfusion.com/downloads/support/directtrac/general/AUTOCO~2-2010637154.ZIP
Regards,
Thank you for your replay. still I have facing that issue,here i have attached screenshots.I don't know where is wrong
Thanks
Pratheep
Attachment: auto_6545015d.rar
|
<ej:Autocomplete ID="categoryGrouping" Width="205px" ShowPopupButton="true" FilterType="Contains" HighlightSearch="true" DataSourceCachingMode="ViewState" runat="server" WatermarkText="Select a category" ClientSideOnSelect="OnSelect"/> |
- 5 Replies
- 2 Participants
-
PR Pratheep
- Aug 16, 2016 04:30 AM UTC
- Aug 25, 2016 12:09 PM UTC