Select to view content in your preferred language

How to bind an attribute field to a combobox?

608
2
04-13-2011 11:48 AM
DanDong
Deactivated User
I saw a few samples related to bind layers or sublayers names to a combobox. I would like to know how to bind a column of attribute (like STATE_NAME) in one single layer(like http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5) to a combobox. So the combobox will list all the state names. Thank you 🙂
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor

So the combobox will list all the state names.


Did you look at this sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery?
0 Kudos
DanDong
Deactivated User
Did you look at this sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery?


Yes, I saw this sample's code. It seems like performing a query task for initially loading the state_name
queryTask.ExecuteAsync(query, "initial");


Right now I am using this method, I am just wondering whether there is other way that we can directly bind the attribute from one layer to the combox 🙂
0 Kudos