I want to use C# classes to query the database and create a data table and then set it as my DataSource for my TileList. However, after some debugging it seems that TileList does not have a "OnNeedDataSource" attribute to run a method that will query the data table. I know that I can set the DataSourceID, but I prefer to do it via C# code. This is what it looks like
<telerik:RadTileList runat="server" ID="PurchaseTileList" Width="900px"
TileRows="1"
EnableDragAndDrop="True"
SelectionMode="None"
OnTileDataBound="TileListPurchase_OnDataBound"
OnNeedDataSource="TileListPurchase_NeedDataSource">
<DataBindings>
<CommonTileBinding TileType="RadTextTile" Shape="Square" DataTitleTextField="ProductDescription" DataNameField="ProductID" />
<TilePeekTemplate>
<div class="productNamePeek"><%# DataBinder.Eval(Container.DataItem,"PName") %></div>
</TilePeekTemplate>
</DataBindings>
<Groups>
<telerik:TileGroup>
<telerik:RadTextTile runat="server" Shape="Square" Font-Size="18px" Font-Bold="true"
Text="Products">
<Title Text=""></Title>
</telerik:RadTextTile>
</telerik:TileGroup>
</Groups>
</telerik:RadTileList>
My TileListPurchase_NeedDataSource will set Data Source to a created DataTable (This, however, is never run)
and my TileListPurchase_OnDataBound currently doesn't do much seeing as I'm not sure how to set these values for the tile.
<telerik:RadTileList runat="server" ID="PurchaseTileList" Width="900px"
TileRows="1"
EnableDragAndDrop="True"
SelectionMode="None"
OnTileDataBound="TileListPurchase_OnDataBound"
OnNeedDataSource="TileListPurchase_NeedDataSource">
<DataBindings>
<CommonTileBinding TileType="RadTextTile" Shape="Square" DataTitleTextField="ProductDescription" DataNameField="ProductID" />
<TilePeekTemplate>
<div class="productNamePeek"><%# DataBinder.Eval(Container.DataItem,"PName") %></div>
</TilePeekTemplate>
</DataBindings>
<Groups>
<telerik:TileGroup>
<telerik:RadTextTile runat="server" Shape="Square" Font-Size="18px" Font-Bold="true"
Text="Products">
<Title Text=""></Title>
</telerik:RadTextTile>
</telerik:TileGroup>
</Groups>
</telerik:RadTileList>
My TileListPurchase_NeedDataSource will set Data Source to a created DataTable (This, however, is never run)
and my TileListPurchase_OnDataBound currently doesn't do much seeing as I'm not sure how to set these values for the tile.