Binding a combo box to more than one data column


i have silverlight application uses wcf service data source.

i databinding combobox in client_completed event handler of wcf data call follows:

void client_getsitescompleted(object sender, myproject.myservicereference.getsitescompletedeventargs e)

{

sitecombo.itemssource = e.result;

sitecombo.displaymemberpath =
"sitename";

 

// messagebox.show("sites: " + sitecombo.items.count);

}

as can see binding combo "sitename" column of datasouce. when user selects combo item, need siteid associated column in database. field returned query , availabkle in e.result.

is possible associated siteid after user has selected sitename combo box?

thanks help

 

 hi gp100mk

 

i wondering if result retreive wcf list of object?

if so, when you  retreive siteid using code sample below

//i assume e.result list<siteobject>

siteobject  = (siteobject) combobox1.selecteditem;

int sid = so.siteid;

 

hope can help.

 please forgive me if mis-understood issue.



Silverlight  >  Programming Silverlight with .NET – General



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607