CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 string type bound column doesn't set the SelectedIndex correctly

Print topic Send  topic

Author Message
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


View profile  Send private message
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
View profile  Send private message
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!

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.