This is a migrated thread and some comments may be shown as answers.

RadTileList problem with selection changed

1 Answer 34 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Robert Sadza
Top achievements
Rank 1
Robert Sadza asked on 21 Oct 2015, 11:26 AM

Helo,

I have a problem because  the event selection changed is not fired,

aspx code:

    <form id="form1" runat="server">

         <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTileList1">
                <UpdatedControls>                    
                    <telerik:AjaxUpdatedControl ControlID="Button1"  />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
    <div>
        <div id="header">
        </div>
        <div id="content">
              <telerik:RadTileList runat="server" ID="RadTileList1" Width="100%" Height="500px" TileRows="3" SelectionMode="multiple" EnableDragAndDrop="true" CssClass="TileListStart"  AutoPostBack="True" OnSelectionChanged="RadTileList1_SelectionChanged1">
        </telerik:RadTileList>
        </div>
        <div id="footer">
            <asp:Button ID="Button1" runat="server" Text="Button"/>
        </div>    
    </div>
    </form>

 

and c# code:

 protected void Page_Init(object sender, EventArgs e)
        {

            PopulateTileList();

        }   
        private void PopulateTileList()
        {

            RadTileList1.Groups.Add(new TileGroup());

            RadTileList1.Groups[0].Tiles.Add(new RadTextTile() { Text = "1", BackColor = ColorTranslator.FromHtml("#e83737") });

            RadTileList1.Groups[0].Tiles.Add(new RadTextTile() { Text = "2", BackColor = ColorTranslator.FromHtml("#008de7"), Width = 300 });

            RadTileList1.Groups[0].Tiles.Add(new RadTextTile() { Text = "3", BackColor = ColorTranslator.FromHtml("#51ab2e") });

            RadTileList1.Groups[0].Tiles.Add(new RadTextTile() { Text = "4", BackColor = ColorTranslator.FromHtml("#f5c020") });

            RadTileList1.Groups.Add(new TileGroup());

            RadTileList1.Groups[1].Tiles.Add(new RadTextTile() { Text = "5", BackColor = ColorTranslator.FromHtml("#9b58b5") });

            RadTileList1.Groups[1].Tiles.Add(new RadTextTile() { Text = "6", BackColor = ColorTranslator.FromHtml("#91c930") });

            RadTileList1.Groups[1].Tiles.Add(new RadTextTile() { Text = "7", BackColor = ColorTranslator.FromHtml("#ee8310") });

            RadTileList1.Groups[1].Tiles.Add(new RadTextTile() { Text = "8", BackColor = ColorTranslator.FromHtml("#0058bc") });

           

        }
       
        protected void RadTileList1_SelectionChanged1(object sender, TileListDataEventArgs e)
        {
            List<RadBaseTile> selectedTiles = (sender as RadTileList).GetSelectedTiles();

            string selectionList = "";

            foreach (RadBaseTile tile in selectedTiles)
            {
                Button1.Text = selectedTiles.Count.ToString();

            }
        }

Can You help me resolve problem?

Best Regards

Robert Sadza

 ‚Äč

1 Answer, 1 is accepted

Sort by
0
Robert Sadza
Top achievements
Rank 1
answered on 21 Oct 2015, 11:35 AM
I use the n following the release Telerik controls : v.2014.1.403.40
Tags
TileList
Asked by
Robert Sadza
Top achievements
Rank 1
Answers by
Robert Sadza
Top achievements
Rank 1
Share this question
or