Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Repeater Databinding

$
0
0
Repeater Databinding
Web Connection 5.0
Repeater Databinding
01/07/2012
03:34:29 PM
3EJ0XDUFC Show this entire thread in new window
From:
To:
Attachments:
None

Not sure what isn't working for you but this works for me:

Web Control Markup

<ww:wwWebRepeater runat="server" ID="repCustomers"> <ItemTemplate> <%= Company %> <ww:wwWebDropDownList runat="server" ID="lstStates" /> <hr /> </ItemTemplate> </ww:wwWebRepeater>


FoxPro Code Behind

FUNCTION OnLoad() SELECT * from tt_cust into cursor TQuery this.repCustomers.DataSource = "TQuery" SELECT cData as StateCode, cData1 as State ; FROM wws_lookups ; INTO CURSOR TStates this.lstStates.DataSource = "TStates" this.lstStates.DataValueField = "StateCode" this.lstStates.DataTextField = "State" ENDFUNC * Onload

The repeater will call databind on each of the child controls and so display the listbox for each. The control name will be lstStates_1, lcStates_2 etc. Selections automatically post back. You can control code based selections with ControlSource...

+++ Rick ---

I know this subject has been covered many times - but I used to have this working in earlier WC versions. Everything in my repeater works perfectly EXCEPT the wwdropdownlist control - which I cannot make databind anymore. As I said, this used to work for me.

Can anyone help me to make this work? I need to upgrade an application and cannot do so if I break the functionality in this way.

Thanks,

George ...




Rick Strahl
West Wind Technologies

Where do you want to surf today?
Reader Version: 5.0

from Maui, Hawaii



Viewing all articles
Browse latest Browse all 10393

Trending Articles