Web Connection
Binding Errors with DropDownList
Gravatar is a globally recognized avatar based on your email address. Binding Errors with DropDownList
  Jim Day
  All
  Aug 24, 2024 @ 03:47pm
<ww:wwWebDropDownList ID="cboHome" runat='server' DataTextField="Desc" DataValueField="Key" ControlSource="Home" </ww:wwWebDropDownList>

On all my dropdownlists like above, I get a databinding error. The proper values are displayed and saved upon submit.

They all function properly except for the binding error. I know this is depreciated code but this is the only way I know how to input data in a repeater.

Grid does not seem to have the same flexibility.

thanks

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Rick Strahl
  Jim Day
  Aug 24, 2024 @ 05:18pm

One of those fields is invalid or the data that is displayed might be. Perhaps a null value in the list that's throwing an error half way through the list rendering?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Jim Day
  Rick Strahl
  Aug 24, 2024 @ 05:36pm

The control source is a 3 character field in a database

The data value is a three character field in a cursor There could be two letters and a space.

The data text is a 25 character field with a team name of 2 or 3 words. In the same cursor as the value.

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Rick Strahl
  Jim Day
  Aug 24, 2024 @ 05:47pm

I don't know.

Set a breakpoint in the wwWebDropdown control code and see what's throwing the error.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Jim Day
  Rick Strahl
  Aug 24, 2024 @ 05:53pm

Sorry the data source is a cursor. The related dbf is being updated by using avars to review the answers entered to Update the dbf.

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Jim Day
  Jim Day
  Aug 25, 2024 @ 02:01pm
SELECT schedule
GO top
this.cboTeams.databind

Needed to have the file where the datasource resided open before doing databind. Solved the errors.

Thanks for the help.

Jim

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Rick Strahl
  Jim Day
  Aug 26, 2024 @ 06:02am

On all my dropdownlists like above, I get a databinding error. The proper values are displayed and saved upon submit.

I don't understand how you could have said that it worked before (except for the binding error) - that you could select values and save when the cursor was not actually correctly bound? If you got a biding error because the list was not bound there would be no data to display...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Binding Errors with DropDownList
  Jim Day
  Rick Strahl
  Aug 26, 2024 @ 07:44am
lnVars = Request.aFormVars(@laVars) 
FOR lnx = 1 TO lnVars
	lcActiveID = this.RepClosest.UniqueId+"_Cbowinner_"+ TRANSFORM(lnx)
	lnWinnerPK = VAL(Request.Form(lcActiveId))

First all the binding errors are in Repeaters. So the dropdown of available answers portion works and I am guessing that the selected value is set there also. The binding error was generated in the dropdown code executed before the repeater code is executed. I use the above to pull the data out when page is Submitted.

It has worked for years but in a new page I had too many drop downs to ignore. Glad to figure it out.

Thanks for all you do.

Jim Day

© 1996-2025