[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

ObjectList inline databinding - Help

Brad

1/3/2003 2:50:00 AM

I could used some help with objectlist inline databinding (which seems much
harder than it should be <IMHO>)
After reading ms kb 309496 and implementing it's vb code example I'm getting
the following error:

"Must have one or more fields to databind an ObjectList"

I'm binding a dataview to the objectlist datasource in page_init code
behind....and I know this works with the objectlist if I used specific named
fields rather that inline binding.

Code behind....
===========================
Private Sub Page_Init(...)
Dim _events As New CalendarEvents()
Dim eventRows As DataView = _events.GetEvents(fromDate.Date, thruDate)
If eventRows.Count > 0 Then
eventsList.DataBind()
End If
_events.Dispose()
End Sub

aspx code:
==========================
<mobile:ObjectList >
<DeviceSpecific>
<Choice Filter="isHTML32"
Xmlns="http://schemas.microsoft.com/mobile/html32template...
<ItemTemplate>
<%# DataBinder.Eval(Ctype(Ctype(Container,
ObjectListItem).DataItem, DataRowView), "Title") %>
</ItemTemplate>
</Choice>
</DeviceSpecific>
</mobile:ObjectList>


Thanks

Brad


1 Answer

Brad

1/3/2003 5:30:00 PM

0

Never mind....got it solved