Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
179 views
Hello,

I have a treelist which shows an overview of all contentpages. I have implemented a editbutton in the treelisttemplate which will navigate the user to another page to edit the specific contentpage. I want to achieve the same result when the user doubleclick on a specific row in the treelist. I have achieved in with a single click (ClientSettings-AllowPostBackOnItemClick="true") but is this also possible on a doubleclick event (client)

Thanks

Patrick
Maria Ilieva
Telerik team
 answered on 10 Apr 2013
3 answers
162 views
I'm using the example on your website with RadGrid autorefresh which includes UpdatePanel, UpdateProgress and ASP.NET AJAX Timer.
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/aspajaxgridapplication/defaultcs.aspx?product=grid

I have 2 problems with this example and I couldn't make it work...

The scrollbar keeps jumping to the top everytime there's a refresh...
In your example you have just a few rows but if you have more rows the focus will jump to the top if the user is looking at a bottom row.

Another major issue for us is we need one column to be editable for user comments and the problem is the values are not stored in the datatable that is binded to the RadGrid.
When I remove the timer and updatepanel the edit works fine.

I would appreciate your help since our business requirement is to get the RadGrid auto refreshed but still allow it to be editable.

I appreciate your help.

Here's a snippet of my code:

<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManager1" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="grid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" />
                        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                          
                          
                    </UpdatedControls>
                </telerik:AjaxSetting
                <telerik:AjaxSetting AjaxControlID="btnLock">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" />
                    </UpdatedControls>
                </telerik:AjaxSetting
                <telerik:AjaxSetting AjaxControlID="btnRescan">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" />
                    </UpdatedControls>
                </telerik:AjaxSetting
                <telerik:AjaxSetting AjaxControlID="btnUpdate">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" />
                         <telerik:AjaxUpdatedControl ControlID="UpdatePanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnCancel">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                  
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
<div style="padding-left:5px;padding-top:20px;">
<span class="header2"> Document Scanning Dashboard</span>
      <br/>
<br />
 <asp:CheckBoxList ID="cbxSelectQueue" runat="server" AutoPostBack="true"  RepeatDirection="Horizontal" RepeatLayout="Table" OnSelectedIndexChanged="cbxSelectQueue_SelectedIndexChanged">
                 <asp:ListItem Value="1" Text="Blue Matrix Dashboard" Selected="True">
                </asp:ListItem>
                <asp:ListItem Value="2" Text="Manual Upload Dashboard" Selected="True">
                </asp:ListItem>
                </asp:CheckBoxList>
                    <br />
  
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td colspan="3">
     
    <table cellpadding="1" cellspacing="1"  border="0" >
      
    <tr>    
    <td>Start Date:</td>
    <td>
        <telerik:RadDatePicker ID="dtpStart" MinDate="2011/1/1" runat="server"  >
        </telerik:RadDatePicker>
    </td>
    <td>  </td>
    <td>End Date:</td>
    <td><telerik:RadDatePicker ID="dtpEnd" MinDate="2011/1/1" runat="server" >
        </telerik:RadDatePicker>
        </td>
    </tr>
    <tr>    
    <td>Status:</td>
    <td colspan="2">
        <telerik:RadComboBox ID="cbxStatus" runat="server" Width="123" >
        </telerik:RadComboBox>
    </td>
    <td>  </td>
    <td>
        <asp:Button ID="btnFilter" runat="server" Text="Filter" OnClick="btnFilter_Click">
        </asp:Button>
    </td>
    </tr>
      
    </table>
    
</td>
</tr>
<tr>
<td colspan="3"><asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="dtpStart" ErrorMessage="Enter a date!"></asp:RequiredFieldValidator>
 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="dtpEnd" ErrorMessage="Enter a date!"></asp:RequiredFieldValidator>
 <asp:CompareValidator ID="dateCompareValidator" runat="server" ControlToValidate="dtpEnd" ControlToCompare="dtpStart" Operator="GreaterThanEqual" Type="Date" ErrorMessage="The end date must be after the start date."></asp:CompareValidator></td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080" />
<asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000" />
</td>
<td colspan="2" align="right">
    <asp:Button runat="server" ID="btnRefresh" OnClick="btnRefresh_Click" Text="Refresh">
    </asp:Button>
</td>
</tr>
<tr>
<td colspan="3" style="height:auto;">
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
DisplayAfter="0">
                <ProgressTemplate>
                     
                </ProgressTemplate>
            </asp:UpdateProgress>
    <asp:Timer ID="refreshTimer" runat="server" Interval="5000" OnTick="refreshTimer_Tick" EnableViewState="False" >
                    </asp:Timer>
       <asp:UpdatePanel ID="UpdatePanel1" runat="server" EnableViewState="False" 
        ChildrenAsTriggers="False" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="refreshTimer" EventName="Tick" />
            
        </Triggers>
        <ContentTemplate>
             
<span class="header3">Active Documents</span>
    <telerik:RadGrid ID="grid" runat="server" AllowPaging="True" AllowSorting="True" 
                GridLines="Both" AutoGenerateColumns="False" CellSpacing="0" CellPadding="0" 
                OnNeedDataSource="grid_NeedDataSource" Skin="Office2007" PageSize="50" 
                OnDeleteCommand="grid_DeleteCommand" OnItemCreated="grid_ItemCreated" 
                OnItemUpdated="grid_ItemUpdated" OnItemInserted="grid_ItemInserted" Width="1035" AllowAutomaticUpdates="false" onupdatecommand="grid_UpdateCommand"  >
  
<MasterTableView DataKeyNames="DocumentQueueID">
  
    <Columns>
        <telerik:GridBoundColumn DataField="DocumentQueueID" 
            UniqueName="columnDocumentQueueID" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridEditCommandColumn UniqueName="EditColumn" ButtonType="ImageButton" HeaderStyle-Width="10px"  />
  
         <telerik:GridTemplateColumn UniqueName="columnTitle" SortExpression="Title" HeaderText="Title" HeaderStyle-Width="220px" >
                  <ItemTemplate>
                  <asp:Image ID="imgWasReplaced" runat="server" Visible='<%# DataBinder.Eval(Container.DataItem, "WasReplaced")%>' AlternateText="Replaced" ImageUrl="../Images/ArrowUp.gif" />
                    
                     <asp:LinkButton ID="btnTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title")%>' OnClientClick='<%# Eval("DocumentQueueID","return ShowFileWindow( {0} )")%>'  />
                     <br />
                     <asp:Image ID="imgLock" runat="server" Visible='<%# DataBinder.Eval(Container.DataItem, "Locked")%>' AlternateText="Locked" ImageUrl="../Images/Security.GIF" />
                     <asp:Label ID="lblLock" runat="server" Font-Size="XX-Small" Visible='<%# DataBinder.Eval(Container.DataItem, "Locked")%>' Text=""></asp:Label>
                  </ItemTemplate>
                 </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="DocID" 
            HeaderText="Doc ID" 
            UniqueName="columnDocID" HeaderStyle-Width="73px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Analyst" 
            HeaderText="Analyst" 
            UniqueName="columnAnalyst" HeaderStyle-Width="80px"
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LastUpdatedDate" 
            HeaderText="Update Date"
            UniqueName="columnLastUpdatedDate" HeaderStyle-Width="73px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Status" 
            HeaderText="Status" 
            UniqueName="columnStatus" HeaderStyle-Width="55px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LastScanDate" 
            HeaderText="Scan Date" 
            UniqueName="columnLastScanDate" HeaderStyle-Width="70px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="NoOfPages" 
            HeaderText="Pages" 
            UniqueName="columnNoOfPages" HeaderStyle-Width="35px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="UploadedBy" 
            HeaderText="Uploaded By" 
            UniqueName="columnUploadedBy" HeaderStyle-Width="75px">
        </telerik:GridBoundColumn>
  
         <telerik:GridTemplateColumn UniqueName="columnRescan" HeaderStyle-Width="55px">
                  <ItemTemplate>
                     <asp:LinkButton ID="btnRescan" runat="server" AutoPostBack="true" Text="Re-Scan" OnClick="btnRescan_Click" />
                  </ItemTemplate>
                 </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="columnLock" HeaderStyle-Width="35px">
                  <ItemTemplate>
                     <asp:LinkButton ID="btnLock" runat="server" AutoPostBack="true" Text="Lock" OnClick="btn_Click" />
                  </ItemTemplate>
                 </telerik:GridTemplateColumn>
         
        <telerik:GridTemplateColumn UniqueName="columnViewResults" HeaderStyle-Width="50px"  >
  
                  <ItemTemplate>
                    
                  <asp:LinkButton ID="btnViewResults" runat="server" Font-Size="Small" Text='<%# DataBinder.Eval(Container.DataItem, "ViewResultsText")%>' Visible='<%# DataBinder.Eval(Container.DataItem, "ViewResultsVisible")%>' />
  
                  <asp:Label ID="lblResults" runat="server" Font-Size="Small" Visible='<%# DataBinder.Eval(Container.DataItem, "lblResultsVisible")%>' Text='<%# DataBinder.Eval(Container.DataItem, "lblResultsText")%>'></asp:Label>
                 <br />
                  <asp:Label ID="lblHitsNum" runat="server" Font-Size="XX-Small" Visible='<%# DataBinder.Eval(Container.DataItem, "lblHitsNumVisible")%>' Text='<%# DataBinder.Eval(Container.DataItem, "lblHitsNumText")%>'></asp:Label>
                    
                  </ItemTemplate>
                    
                 </telerik:GridTemplateColumn>
         
        <telerik:GridButtonColumn ConfirmText="Are you sure you would like to remove this document from the queue?" ConfirmDialogType="RadWindow" ConfirmTitle="Remove Document" ButtonType="ImageButton" CommandName="Delete" HeaderStyle-Width="10px" />
        <telerik:GridBoundColumn  HeaderText="Comments" HeaderButtonType="TextButton"
                                DataField="UserComments" Visible="false" >
                                  
                            </telerik:GridBoundColumn>
    </Columns>
    <EditFormSettings EditFormType="Template">
                <FormTemplate>
                    <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                        style="border-collapse: collapse; background: white;">
                        <tr >
                            <td colspan="2" class="header" >
                                <b>Add/Update Comments</b>
                            </td>
                        </tr>
          
                        <tr>
                            <td>
                                <table id="Table4" cellspacing="1" cellpadding="1" width="550" border="0" >
               
             <tr>
                                        <td>
                                              
                                        </td>
                                        <td>
                                            <asp:Label ID="lblID" Text='<%# Bind( "DocumentQueueID") %>' runat="server" Visible="false" >
                                            </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Comments:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtComments" Text='<%# Bind( "UserComments") %>' runat="server" TextMode="MultiLine" Rows="5" Width="400" >
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                     
                                </table>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="2">
                               <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update"  ></asp:Button
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
  
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
  
    <PagerStyle AlwaysVisible="True" Position="Top"  />
</MasterTableView>
    </telerik:RadGrid>
 </ContentTemplate>
 </asp:UpdatePanel>
<br />
<br />
<span class="header3">Published Documents</span>
<telerik:RadGrid ID="gridPublished" runat="server" AllowPaging="True" AllowSorting="True" GridLines="Both" AutoGenerateColumns="False" CellSpacing="0" CellPadding="0" OnNeedDataSource="grid_NeedDataSource" Skin="Office2007" PageSize="50" OnDeleteCommand="grid_DeleteCommand" OnItemCreated="grid_ItemCreated" Width="1030"  >
  
<MasterTableView DataKeyNames="DocumentQueueID">
  
    <Columns>
        <telerik:GridBoundColumn DataField="DocumentQueueID" 
            UniqueName="columnDocumentQueueID" Visible="False">
        </telerik:GridBoundColumn>
          
         <telerik:GridTemplateColumn UniqueName="columnTitle" SortExpression="Title" HeaderText="Title"   >
                  <ItemTemplate>
                  <asp:Image ID="imgWasReplaced" runat="server" Visible='<%# DataBinder.Eval(Container.DataItem, "WasReplaced")%>' AlternateText="Replaced" ImageUrl="../Images/ArrowUp.gif" />
                    
                     <asp:Label ID="lblTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title")%>' />
                     <br />
                     <asp:Image ID="imgLock" runat="server" Visible='<%# DataBinder.Eval(Container.DataItem, "Locked")%>' AlternateText="Locked" ImageUrl="../Images/Security.GIF" />
                     <asp:Label ID="lblLock" runat="server" Font-Size="XX-Small" Visible='<%# DataBinder.Eval(Container.DataItem, "Locked")%>' Text=""></asp:Label>
                  </ItemTemplate>
                 </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="DocID" 
            HeaderText="Doc ID" 
            UniqueName="columnDocID" HeaderStyle-Width="73px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Analyst" 
            HeaderText="Analyst" 
            UniqueName="columnAnalyst" HeaderStyle-Width="80px"
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LastUpdatedDate" 
            HeaderText="Update Date"
            UniqueName="columnLastUpdatedDate" HeaderStyle-Width="78px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Status" 
            HeaderText="Status" 
            UniqueName="columnStatus" HeaderStyle-Width="75px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LastScanDate" 
            HeaderText="Scan Date" 
            UniqueName="columnLastScanDate" HeaderStyle-Width="78px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="NoOfPages" 
            HeaderText="Pages" 
            UniqueName="columnNoOfPages" HeaderStyle-Width="35px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="UploadedBy" 
            HeaderText="Uploaded By" 
            UniqueName="columnUploadedBy" HeaderStyle-Width="75px">
        </telerik:GridBoundColumn>
  
         <telerik:GridTemplateColumn UniqueName="columnRescan" HeaderStyle-Width="40px" Visible="false">
                  <ItemTemplate>
                     <asp:LinkButton ID="btnRescan" runat="server" AutoPostBack="true" Text="Re-Scan" OnClick="btnRescan_Click" />
                  </ItemTemplate>
                 </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="columnLock" HeaderStyle-Width="35px" Visible="false">
                  <ItemTemplate>
                     <asp:LinkButton ID="btnLock" runat="server" AutoPostBack="true" Text="Lock" OnClick="btn_Click" />
                  </ItemTemplate>
                 </telerik:GridTemplateColumn>
         
        <telerik:GridTemplateColumn UniqueName="columnViewResults" HeaderStyle-Width="76px"  >
  
                  <ItemTemplate>
                    
                  <asp:LinkButton ID="btnViewResults" runat="server" Font-Size="Small" Text='<%# DataBinder.Eval(Container.DataItem, "ViewResultsText")%>' Visible='<%# DataBinder.Eval(Container.DataItem, "ViewResultsVisible")%>' />
  
                  <asp:Label ID="lblResults" runat="server" Font-Size="Small" Visible='<%# DataBinder.Eval(Container.DataItem, "lblResultsVisible")%>' Text='<%# DataBinder.Eval(Container.DataItem, "lblResultsText")%>'></asp:Label>
                  <asp:Label ID="lblHitsNum" runat="server" Font-Size="XX-Small" Visible='<%# DataBinder.Eval(Container.DataItem, "lblHitsNumVisible")%>' Text='<%# DataBinder.Eval(Container.DataItem, "lblHitsNumText")%>'></asp:Label>
                    
                  </ItemTemplate>
                    
                 </telerik:GridTemplateColumn>
    
       <%-- <telerik:GridButtonColumn Text="Lock & View" UniqueName="columnLockView">
        </telerik:GridButtonColumn>--%>
<%--        <telerik:GridTemplateColumn UniqueName="columnViewResults" HeaderStyle-Width="73px">
          <ItemTemplate>
             <asp:LinkButton ID="btnViewResult" runat="server" Text="View Results" />
          </ItemTemplate>
         </telerik:GridTemplateColumn>--%>
        <telerik:GridButtonColumn ConfirmText="Are you sure you would like to remove this document from the queue?" ConfirmDialogType="RadWindow" ConfirmTitle="Remove Document" ButtonType="ImageButton" CommandName="Delete" HeaderStyle-Width="10px" Visible="false" />
    </Columns>
    <PagerStyle AlwaysVisible="True" Position="Top"  />
</MasterTableView>
    </telerik:RadGrid>
  
  
    </td>
</tr>
  
<tr>
<td colspan="3"></td>
</tr>
</table>
</div>
  
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Office2007"  />


----------------------------------------- CS file --------------------------------------------

protected void refreshTimer_Tick(object sender, EventArgs e)
    {
        RefreshGrid();
    }
  
public void RefreshGrid()
    {
        Session["QueueDataTable"] = null;
        Session["PublishedQueueDataTable"] = null;
        grid.DataSource = this.DataTable;
        grid.DataBind();
        gridPublished.DataSource = this.PublishedDataTable;
        gridPublished.DataBind();
    }
  
protected void grid_UpdateCommand(object sender, GridCommandEventArgs e)
    {
        GridEditableItem item = ((GridEditableItem)(e.Item));
        //string docQueueID = item["DocumentQueueID"].Text;
        Label lblID = (Label)item.FindControl("lblID");
        TextBox txtComment = (TextBox)item.FindControl("txtComments");
  
        QueueMgr.UpdateUserComment(Convert.ToInt32(lblID.Text), txtComment.Text); // updates in the database
        Session["QueueDataTable"] = null;
        //refreshTimer.Enabled = true;
    }
  
public DataTable DataTable
    {
        get
        {
            object obj = this.Session["QueueDataTable"];
            if (obj != null)
                return (DataTable)obj;
  
            DataTable dt = QueueMgr.GetQueue(GetFilterArgs()); // gets data from the database
  
            this.Session["QueueDataTable"] = dt;
  
            return dt;
        }
    }

Maria Ilieva
Telerik team
 answered on 10 Apr 2013
3 answers
263 views
Hello

   I have used RadComboBox with checkBoxes 
    my question is :  which event fires when check box is checked 

   because my RadComboBox contain 6 checkboxes and i want to change state of ckeckboxes  on selection of checkbox
 so i want an event which gets fire when i select any one checkbox from RadComboBox.

waiting for reply

Thanks 
Kishor
Hristo Valyavicharski
Telerik team
 answered on 10 Apr 2013
3 answers
98 views
Hi,

With the new release, a very strange problem occurs...

In your demo with ContentAreaMode='div':
http://demos.telerik.com/aspnet-ajax/editor/examples/contentareamodediv/defaultcs.aspx

When using Firefox:
1. Move the cursor above the dropdown "Choose Toolbar Mode", do NOT click it...
2. Try click in the Editor again and edit the content -> wont work

When looking in Firebug, I can see that when hovering the dropdown, the contenteditable property of the editor is set to false...

Regards
Caesar
Misho
Telerik team
 answered on 10 Apr 2013
1 answer
218 views
Hi,

How can I display a RadTab as in two rows ie one below the other?

Thanks,
Karl.
Princy
Top achievements
Rank 2
 answered on 10 Apr 2013
1 answer
118 views
Hi,

How to perform reordering of items in RadTab? I would like to have any sample solution.

Thanks,
Karl
Princy
Top achievements
Rank 2
 answered on 10 Apr 2013
1 answer
59 views
Hi

There is an Orgchart in my product page which contain a main tree like structure with few nodes. If I click on one of the nodes, it must display a new OrgChart that contains all the child nodes corresponding to the one I clicked and it should be able to go back to the main node as well. How to achieve this? Is it possible with RadOrgChart?

Thanks,
Lovella.
Princy
Top achievements
Rank 2
 answered on 10 Apr 2013
1 answer
76 views
Hi,

Can anyone help with a demo that demonstrate data binding the nodes of OrgChart with an entity datasource?

Thanks,
Lovella.
Princy
Top achievements
Rank 2
 answered on 10 Apr 2013
1 answer
121 views
Hi,
I have a RadTreeList control in a web page. I get the following error when i change to "Design" view.

There was an error rendering the control.
[A] Telerik.Web.UI.RadTreeList cannot be cast to [B] Telerik.Web.UI.RadTreeList. Type A originates from 'Telerik.Web.UI,Version=2012.1.215.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location  'C:\user\myuser\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\dnsandqz01\Telerik.Web.UI.dll'.
Type B originates from 'Telerik.Web.UI,Version=2012.1.215.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context  'LoadNeither' at location 'C:\user\myuser\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\m27i_m801\Telerik.Web.UI.dll'.

Does anyone know how i can solve it?
Thank you.


Sonia
Top achievements
Rank 1
 answered on 10 Apr 2013
3 answers
286 views
I added a telerik:RadTabStrip with multipageview option. Then under a pageview I added a Telerik Rotator control.
If I set static value it works fine, but, if I create a datatable in server side and try to bind it to datasource of the rotator control it does not display any data. The code I used -


ASPX Code:
<telerik:RadRotator ID="RadRotator1" runat="server" Width="900px" Skin="Black" EnableEmbeddedSkins="false"
                    CssClass="rotatorStyle" RotatorType="Buttons" ScrollDuration="500" >
                    <Items>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
                                <div class="RotatorItem">
                                    <h2><asp:Label ID="lblTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "title") %>'></asp:Label></h2>
                                    <div class="txt_placeholder">
                                        <asp:Label ID="lblShortDesc" Text='<%# DataBinder.Eval(Container.DataItem, "desc")%>' runat="server"></asp:Label>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        
                    </Items>
                </telerik:RadRotator>


Server Code:

DataTable dt = new DataTable();
                    dt.Columns.Add("title", typeof(string));
                    dt.Columns.Add("desc", typeof(string));

                    dt.Rows.Add("T1", "AAA");
                    dt.Rows.Add("T2", "BBB");
                    dt.Rows.Add("T3", "CCC");

                    RadRotator1.DataSource = dt.DefaultView;
                    
                    RadRotator1.DataBind();

Can someone please help me with this?

Thanks in advance.
Slav
Telerik team
 answered on 10 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?