Rank: Newbie Groups: Member
Joined: 7/26/2007 Posts: 6
|
I'm trying to bind a tabstrip to an asp sqldatasource, but I can't get it to work. See my code below. SqlUserGroups is the id of the datasource (I've tested the datasource and I know it returns data). GroupName is the field in the result set. When I run the code I get nothing in the tabstrip. On another page I'm binding a tabstrip to an XML Datasource and it works great, so I can't figure out what I'm doing wrong here. Any ideas?
<eo:tabstrip DataSourceID="SqlUserGroups" id="tbGroups" runat="server" ControlSkinID="None"> <TopGroup> <Bindings> <eo:DataBinding DataField="GroupName" Property="Value" /> </Bindings> </TopGroup> <LookItems> <eo:TabItem Height="21" ItemID="_Default" LeftIcon-SelectedUrl="00010605" LeftIcon-Url="00010604" NormalStyle-CssText="background-image: url(00010602); background-repeat: repeat-x; font-weight: normal; color: black;" RightIcon-SelectedUrl="00010607" RightIcon-Url="00010606" SelectedStyle-CssText="background-image: url(00010603); background-repeat: repeat-x; font-weight: bold; color: #ff7e00;" Text-Padding-Bottom="2" Text-Padding-Top="1"> <SubGroup ItemSpacing="1" Style-CssText="background-image:url(00010601);background-position-y:bottom;background-repeat:repeat-x;color:black;cursor:hand;font-family:Verdana;font-size:12px;"> </SubGroup> </eo:TabItem> </LookItems> </eo:tabstrip>
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Ryan, SqlDataSource won't work. TabStrip derives from BaseNavigator, which requires an hierarchical data source. Besides, even if it were to take SqlDataSource, you still need to specify which field is used to populate the tab item text. The easiest way for you would be populating either from an IDataReader (SqlDataReader, for example) or a DataTable. You can also populate from an IEnumerable (an array, or ArrayList, for example). You can find more information on those at here: http://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fDataBinding%2fpopulate_table.htmlhttp://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fDataBinding%2fpopulate_array.htmlThanks
|
Rank: Newbie Groups: Member
Joined: 7/26/2007 Posts: 6
|
Thanks for the quick reply (once again!). That gave me what I needed and I've got it working.
|