data binding - Silverlight childwindow combobox lookup -


i trying hardest silverlight keep getting caught @ hurdles simple tasks. have main datagrid on main form lists addresses. have child window allows user edit these addresses combobox country up. have adreessdomaindatasource , countrydomaindatasource. have combo box in child window code follows:

         <riacontrols:domaindatasource autoload="true" d:designdata="{d:designinstance my:country, createlist=true}" height="0" name="countrydomaindatasource" queryname="getcountriesquery" width="0">         <riacontrols:domaindatasource.domaincontext>             <my:countriescontext />         </riacontrols:domaindatasource.domaincontext>     </riacontrols:domaindatasource>       <riacontrols:domaindatasource autoload="false" d:designdata="{d:designinstance my:address, createlist=true}" height="0" name="addressdomaindatasource" queryname="getaddressquery" width="0" loaddelay="10000">         <riacontrols:domaindatasource.domaincontext>             <my:addresscontext />         </riacontrols:domaindatasource.domaincontext>         <riacontrols:domaindatasource.queryparameters>             <riacontrols:parameter parametername="intaddressid" />         </riacontrols:domaindatasource.queryparameters>     </riacontrols:domaindatasource>        <grid datacontext="{binding elementname=addressdomaindatasource, path=data}" horizontalalignment="left" margin="63,27,0,0" name="grid1" verticalalignment="top"> 

this writes correctly when change different item in list on start replaced first item in countrydomaindatasource list. have put breakpoint on web.g.vb code , appears intcountryid set correctly on start straight after returning it, getting overwritten first value in list. have not written code set value first value in countrydomaindatasource list? appears after countrydomaindatasource_loadeddata event finished sets countryid there. there anyway make countrydomaindatasource load first , addressdomaindatasource second or doing silly or wrong here have been scratching head on awhile?

any appreciated.

thanks

when dds loads data successfully, select first item in list. reason (among others), recommend don't use populate comboboxes. here couple posts put jeff , me explaining reasoning , better alternatives.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -