TileList OnNeedDataSource

3 posts, 0 answers
  1. Jason
    Jason avatar
    20 posts
    Member since:
    Jun 2014

    Posted 22 Jun 2014 Link to this post

    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"
                        <CommonTileBinding TileType="RadTextTile" Shape="Square" DataTitleTextField="ProductDescription" DataNameField="ProductID" />
                            <div class="productNamePeek"><%# DataBinder.Eval(Container.DataItem,"PName") %></div>
                            <telerik:RadTextTile runat="server" Shape="Square" Font-Size="18px" Font-Bold="true"
                                <Title Text=""></Title>

    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.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Jun 2014 in reply to Jason Link to this post

    Hi Jason,

    In order to achieve your scenario please try to bind the RadTileList in the Page_Load event. Please have a look into the following help documentation for further information.

    Defining Structure
    Supported Datasources

  3. DevCraft R3 2016 release webinar banner
  4. Jason
    Jason avatar
    20 posts
    Member since:
    Jun 2014

    Posted 23 Jun 2014 in reply to Shinu Link to this post

    From what I understand, I just set the datasource in page_load instead. That sounds perfect. Thank you.
Back to Top