Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
236 views
Hi everyone,
                I want to add any control dynamically in panel or layout.Can any one told me in which panel or layout i can add control dynamically.
I tried to add checkbox in panel(RadXmlHttpPanel also).
protected void Page_Load(object sender, EventArgs e)
    {
 
    }
    protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
    {
        lblContent.Text = "u clicked " + e.Item.Text;
    }
    protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
    {
        lblContent.Text = "u clicked " + e.Item.Text;
    }
    protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
    {
        lblContent.Text = "u clicked " + e.Tab.Text;
    }
    protected void RadButton_addControl_Click(object sender, EventArgs e)
    {
        int i;
        for (i = 0; i < 4; i++)
        {
            CheckBox ch = new CheckBox();
            ch.ID = "ch" + i.ToString();
            this.form1.Controls.Add(ch);
        }
    }
 
in xml
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css" media="screen">
        #content
        {
         
        height: 165px;
        width: 500px;
        margin-left: 75px;
        vertical-align: top;
        }
        #tabs
        {
        margin-left: 75px;
        width: 500px;
        vertical-align: bottom;
        }
    </style>
</head>
<body style="height: 437px">
    <form id="form1" runat="server">
    <asp:ScriptManager ID = "ScriptManager1" runat = "server"></asp:ScriptManager>
    <div>
    <telerik:RadMenu ID="RadMenu1" Runat="server" style="top: 0px; left: 0px"
        onitemclick="RadMenu1_ItemClick">
        <Items>
            <telerik:RadMenuItem runat="server" Text="Edit">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="copy">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="cut">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="paste">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="print">
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
    </div>
    <br />
    <br />
    <div>
    <telerik:RadToolBar ID="RadToolBar1" Runat="server"
        onbuttonclick="RadToolBar1_ButtonClick" Orientation="Vertical" Width="70px">
        <Items>
            <telerik:RadToolBarDropDown runat="server" Text="edit">
                <Buttons>
                    <telerik:RadToolBarButton runat="server" Text="copy">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="cut">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="paste">
                    </telerik:RadToolBarButton>
                </Buttons>
            </telerik:RadToolBarDropDown>
            <telerik:RadToolBarSplitButton runat="server" Text="print">
            </telerik:RadToolBarSplitButton>
        </Items>
    </telerik:RadToolBar>
    </div>
     
    <br />
    <br />
    <div id="content" runat="server">
        <asp:Label ID="lblContent" runat="server" Text="Label"></asp:Label>
 
        <div id="tabs" runat="server">
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Orientation="HorizontalBottom"
                Skin="WebBlue" OnTabClick="RadTabStrip1_TabClick" SelectedIndex="0" Width="500px">
            </telerik:RadTabStrip>
        </div>
    </div>
    <telerik:RadButton ID="RadButton_addControl" runat="server"
            onclick="RadButton_addControl_Click" Text="AddControl">
          </telerik:RadButton>
    </form>
    </body>
</html>


This is working for first time but when i am trying do any other operation the check box is removed from the panel.
How i will add the control ?
Can any one give a simple example ?

thanks
bibhu
Bibhukalyana
Top achievements
Rank 1
 answered on 01 Feb 2012
2 answers
150 views
Hi

I want to popup another aspx page for appointment insertion and appointment updation instead of the template used for the purpose.
How can I acheive the requirement?

Thnks and Regards
Chinnu :)
chinnu
Top achievements
Rank 1
 answered on 01 Feb 2012
1 answer
122 views
I would like to use the RadSChedulerRecurrenceEditor control in an MVC view (ASPX). Is this possible? If so, are there any examples available?
Peter
Telerik team
 answered on 01 Feb 2012
1 answer
520 views
if you know both in c# and javascript please tell me its very urgent......
llike i have values in minute means like 15 in minutes  now i want to convert in to     00:15:00  time format

444444- convert it an to time format please do this for me....
44444 minutes int to 44:60:00
 i dnt know correct conversion of 44444 in to time format please consider this as example.....
Slav
Telerik team
 answered on 01 Feb 2012
0 answers
69 views
I am Useing .NET4.0 version

I had a page with rad controls like comboboxes,buttons and radGrid. i ajaxify these controls through AjaxManager. when i click edit in radGrid colum,the values should display in above comboboxes and textboxes with showing progressbar. but the problem is comboboxes are not populate values after showing progressbar so plz help me

thaks in advance
Chalam
Top achievements
Rank 1
 asked on 01 Feb 2012
1 answer
159 views
hi 
i have an ajaxified RadGrid Control, pop up edit template.

after each post back loading panel viewed on the RadGrid which is the expected behavior but in Google Chrome loading panel displayed in non accurate position, I've browsed the demos on Telerik web site and i get the same thing, is there any way to set the loading panel div in it's position in the case of Google Chrome browser ?? 

is it a browser issue ?

thank you 
rasheed samawi
Vasil
Telerik team
 answered on 01 Feb 2012
3 answers
137 views
hi 
i have an Ajaxified RadGrid control, every thing is cool, but the loading panel displays in wrong position just in Google chrome browser

thank you 
Vasil
Telerik team
 answered on 01 Feb 2012
1 answer
106 views
I'm using rad grid grouping and when expanding groups they should be ajaxified but for some reasons it's still doing a full postback.
Can you help? Here is the code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                       <AjaxSettings>
                           <telerik:AjaxSetting AjaxControlID="grdActivity">
                               <UpdatedControls>
                                   <telerik:AjaxUpdatedControl ControlID="grdActivity" LoadingPanelID="RadAjaxLoadingPanel1" />
                               </UpdatedControls>
                           </telerik:AjaxSetting>
                       </AjaxSettings>
                   </telerik:RadAjaxManager>
                   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                   </telerik:RadAjaxLoadingPanel>
                  <div id="RecentActivityContent" class="QuickViewContent">
                     <telerik:RadGrid runat="server" ID="grdActivity" DataSourceID="objActivity" Width="360px"
                      GridLines="Horizontal" Skin="Sunset" ShowHeader="false" >
                      <HeaderStyle CssClass="HistoryGridHeader" />
                       <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
                       <MasterTableView AutoGenerateColumns="false" CssClass="GridRecentActivity">
                           <GroupByExpressions>
                               <telerik:GridGroupByExpression>
                                   <SelectFields>
                                       <telerik:GridGroupByField FieldAlias="Date" FieldName="Date" FormatString="{0:D}"
                                           HeaderValueSeparator=" from date: " />
                                   </SelectFields>
                                   <GroupByFields>
                                       <telerik:GridGroupByField FieldName="Date" SortOrder="Descending" >
                                       </telerik:GridGroupByField>
                                   </GroupByFields>
                               </telerik:GridGroupByExpression>
                           </GroupByExpressions>
                           <Columns>
                               <telerik:GridTemplateColumn DataField="Message" HeaderText="Message" UniqueName="Message">
                                   <ItemTemplate>
                                       <asp:Label runat="server" id="Label1" Text='<%# Eval("Type") %>' CssClass="FirstColumn" />   -  
                                       <asp:Label runat="server" id="lblMessage" Text='<%# Eval("Message") %>' />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                           </Columns>
                       </MasterTableView>
                       <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
                           <Selecting AllowRowSelect="True"></Selecting>
                           <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
                           ResizeGridOnColumnResize="False"></Resizing>
           </ClientSettings>
                   </telerik:RadGrid>
Thanks,
Ron.
Princy
Top achievements
Rank 2
 answered on 01 Feb 2012
1 answer
263 views
Hi all,

I have one SQL table where I have all the data to load in RadMenu. All Items, links and design definitions.
I can create all items programmatically into RadMenu but after I want to change the background image for each item based on the definition that I have in database. I know that we have this definition in skin css but I want to ignore the skin and I want to load the style programatically. For example:
For item 1 I want a background with image 1
For item 2 I want a background with image 2

As well

For Item 1 I want a rollover image with image 3
For Item 2 I want a rollover image with image 4

And 

For Item 1 I want left image with image 5
For Item 2 I want left image with image 6

How I can do this programmatically?

Regards,
Daniel

Princy
Top achievements
Rank 2
 answered on 01 Feb 2012
1 answer
125 views
I've seen a fair number of posts about creating a toolbar with some buttons which are left justified and others which are right justified. I believe this currently requires a fair bit of javascript and/or css to accomplish, though Telerik may be working on a built-in button alignment solution. I wonder, is there a way at present to center align ALL of the buttons in a toolbar?
Princy
Top achievements
Rank 2
 answered on 01 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?