ComboBox AutoCompele With DataSOurce from WCF Rest
scenario is,
im working wcf rest services
data coming wcf rest in form of json , shaped in custom class...... part of code below
webclient proxy = new webclient(); string classesurl = string.format("http://localhost:23610/employeeservice.svc/getclasses"); string groupsurl = string.format("http://localhost:23610/employeeservice.svc/getgroups"); try { byte[] data = proxy.downloaddata(classesurl); stream stream = new memorystream(data); datacontractjsonserializer obj = new datacontractjsonserializer(typeof(list<classdetaildto>)); classes = obj.readobject(stream) list<classdetaildto>; // txtfname.text = std; comboclass.datasource = classes; comboclass.displaymember = "classname"; comboclass.valuemember = "classid"; comboclass.invalidate();
can see im setting combox datasource list of custom class object returning wcf..
data appears perfeclty in my combobox. want work autocompele property of combox user types fetches matching data upward in google search... please me, in advance
hi zaid,
what ui? winforms, wpf or asp.net? can winforms, need add existing code this:
comboclass.autocompletesource = autocompletesource.listitems; comboclass.autocompletemode = autocompletemode.suggestappend;
~~bonnie dewitt [c# mvp]
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment