rogersw
Posts: 16
|
Posted: 10/06/2004, 3:27 PM |
|
I have a listbox where the Value and Text fields are both String type. When I insert or update a record the data makes it into the database ok. However, when viewing the record later, the listbox is always set to the default vice the value from the database. The value field in the database is set to varchar so I don't think trimming is a problem.
Ideas anyone?
As a work around, I call the HtmlSelect.SetSelection method in the Before Show event until I find a better solution.
/Control requestedfor_type Event BeforeShow. Action Custom Code @207-2A29BDB7
// -------------------------
// resync the listbox, some unknown problem with the above code
// -------------------------
DataCommand reqtype = new SqlCommand(
"select requestedfor_type " +
"from costpoint_requests " +
"where job_no =" + jobid, Settings.ReproDataAccessObject);
item.requestedfor_typeItems.SetSelection(reqtype.Execute().Tables[0].Rows[0][0].ToString());
requestsrequestedfor_type.Items.Clear();
item.requestedfor_typeItems.CopyTo(requestsrequestedfor_type.Items);
//End Control requestedfor_type Event BeforeShow. Action Custom Code
|
|
|
peterr
Posts: 5971
|
Posted: 10/07/2004, 4:03 AM |
|
Hi,
I'd like to recommend contacting our support and later attaching your project.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
rogersw
Posts: 16
|
Posted: 10/07/2004, 5:41 AM |
|
Can't find a problem after all
I had some incorrect column pairs in the Custom Insert Property page. Once I fixed that problem I was able to remove the Custom Before Show code and everything was fine.
My apologies for rushing to judgement, and thanks for your speedy reponse!
|
|
|
|