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]

http://geek-goddess-bonnie.blogspot.com



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'