Saturday, March 24, 2012

CascadingDropDown send to database

Hello, hi have 3 cascadingdropdown..

Every thibk works fine but when i click in the button to save the form( or another postback) i cant pick the selected values..

For data returned form the database i do:

AtlasControlToolkit.CascadingDropDownProperties propDist = cascDrpDist.GetTargetProperties(DropDownDist);

propDist.SelectedValue = dt.Rows[0].Table.Rows[0].ItemArray[15].ToString();

AtlasControlToolkit.CascadingDropDownProperties propConc = cascDrpDist.GetTargetProperties(DropDownConc);

propConc.SelectedValue = dt.Rows[0].Table.Rows[0].ItemArray[14].ToString();

AtlasControlToolkit.CascadingDropDownProperties propFreg = cascDrpDist.GetTargetProperties(DropDownFreg);

propFreg.SelectedValue = dt.Rows[0].Table.Rows[0].ItemArray[13].ToString();

to save values for the postbacks

hfCDISTRITO.Text = cascDrpDist.TargetProperties[0].SelectedValue;

hfCCONCELHO.Text = cascDrpDist.TargetProperties[1].SelectedValue;

hfCFREGUESIA.Text = cascDrpDist.TargetProperties[2].SelectedValue;

but if im inserting a new data how can i do so pick the selectedvalues?

Thanks

MArcos ALves

but if im inserting a new data how can i do so pick the selectedvalues?

sorry i want to say:

but if im inserting a new data how can i pick the selectedvalues?

Please help!! im trying this about 3 weeks!!!!Tongue Tied[:'(]

Thanks a lot!


I'm afraid I don't understand the scenario. Could you please describe it a little more?

No comments:

Post a Comment