Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
279 views
Is there a way to create a tab client side and apply a tab template to it?  I have the template being applied to all tabs and it works if they were created on the initial load of the page but when I add a tab using client-only code the tab template is not applied. 

Update.  I was creating the template server side which would explain why the template would not be applied to tabs created client side.  Does anyone have more information on making a global tab template that will be applied to all tabs (hopefully including newly created tabs client side).

I've seen this example (http://www.telerik.com/DEMOS/ASPNET/Prometheus/TabStrip/Examples/Functionality/Templates/DefaultCS.aspx) which is done by applying tab specific templates, not a global template.  I've also seen the help information here:
http://www.telerik.com/help/aspnet-ajax/tab_add-templates-design-time.html

These are not helpful at explaining simple things like getting the tab text using Databinder.Eval so you can set it in a global template (which is required for dynamically created tabs).  I would like to do a little more advanced work with tab templates but need a small push in the right direction.
Shinu
Top achievements
Rank 2
 answered on 12 Mar 2014
3 answers
124 views
When a RadTabStrip was moved into our header container control it stopped working.  It no longer appears to be associating itself with the MultiPageView control.  Previously the tab strip was at the same level in the control tree as the multi page, however, it is now placed in a header control which uses a content template.  You can see from the client object create statement that the IDs for the multi page and the tabs are missing (I would think the control should fail at this point if an ID was specified and it couldn't find the control).  I tried setting the client ID explicitly to the ID field and that didn't work.

I added the control named RadTabStrip1 for testing.
Works
            <Efficio:EfficioContainer ID="cHeader" ContainerType="Tabbed" Width="658" runat="server">                
            <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" MultiPageID="rmpMain" EnableEmbeddedSkins="False" Width="375" Align="Right" CssClass="tabStrip" runat="server">
                <Tabs>
                    <telerik:RadTab PageViewID="pvGeneral" Text="Add Pending" Value="Opportunity" runat="server" />
                    <telerik:RadTab PageViewID="pvActivity" Text="Add Activity" Value="Activity" runat="server" />
                </Tabs>
            </telerik:RadTabStrip>
            <Efficio:EfficioHeader ID="hTitle" HeaderType="Container" LeftWidth="220" runat="server">
                <ContentTemplate>
                    <Efficio:EfficioHeaderMenu ID="hmConfiguration" Width="200" runat="server">
                        <ItemTemplate>                            
                            <Efficio:EfficioContainer ID="cConfiguration" ContainerType="White" runat="server">
                                <Efficio:EfficioHeader ID="hConfiguration" Text="Configure" runat="server" />
                                <asp:CheckBox ID="chkEnableStageTasks" Text="Stage Tasks Enabled" ClientIDMode="Static" runat="server" />
                                <Efficio:EfficioButton ID="btnClose" Text="Close" OnClientClick="ConfigureStages();CloseHeaderMenu();return false;" runat="server"   />
                            </Efficio:EfficioContainer>
                        </ItemTemplate>
                    </Efficio:EfficioHeaderMenu>
                    <telerik:RadTabStrip ID="tsMain" SelectedIndex="0" MultiPageID="rmpMain" EnableEmbeddedSkins="False" Skin="EfficioSkin" Width="375" Align="Right" CssClass="tabStrip" OnClientTabSelected="tsMain_onTabSelected" runat="server">
                        <Tabs>
                            <telerik:RadTab PageViewID="pvGeneral" Text="Add Pending" Value="<%# TabName.Opportunity %>" runat="server" />
                            <telerik:RadTab PageViewID="pvActivity" Text="Add Activity" Value="<%# TabName.Activity %>" runat="server" />
                            <telerik:RadTab PageViewID="pvProposal" Text="Proposal" Value="<%# TabName.Proposal %>" runat="server" Visible="False" />
                            <telerik:RadTab PageViewID="pvHistory" Text="Activity History" Value="<%# TabName.History %>" Visible="false" runat="server" />
                        </Tabs>
                    </telerik:RadTabStrip>
                </ContentTemplate>
            </Efficio:EfficioHeader>            
            <br class="clear" />            
            <telerik:RadMultiPage ID="rmpMain" SelectedIndex="0" CssClass="radMultiPage multiPageContainer" runat="server">

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadTabStrip, {"_align":2,"_selectedIndex":0,"_skin":"Default","clientStateFieldID":"ctl00_cphM_cHeader_RadTabStrip1_ClientState","multiPageID":"ctl00_cphM_cHeader_rmpMain","selectedIndexes":["0"],"tabData":[{"value":"Opportunity","pageViewID":"ctl00_cphM_cHeader_pvGeneral"},{"value":"Activity","pageViewID":"ctl00_cphM_cHeader_pvActivity"}]}, null, null, $get("ctl00_cphM_cHeader_RadTabStrip1"));
});


Doesn't work
            <Efficio:EfficioContainer ID="cHeader" ContainerType="Tabbed" Width="658" runat="server">

            <Efficio:EfficioHeader ID="hTitle" HeaderType="Container" LeftWidth="220" runat="server">
                <ContentTemplate>
                    <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" MultiPageID="rmpMain" EnableEmbeddedSkins="False" Width="375" Align="Right" CssClass="tabStrip" runat="server">
                        <Tabs>
                            <telerik:RadTab PageViewID="pvGeneral" Text="Add Pending" Value="Opportunity" runat="server" />
                            <telerik:RadTab PageViewID="pvActivity" Text="Add Activity" Value="Activity" runat="server" />
                        </Tabs>
                    </telerik:RadTabStrip>

                    <Efficio:EfficioHeaderMenu ID="hmConfiguration" Width="200" runat="server">
                        <ItemTemplate>                            
                            <Efficio:EfficioContainer ID="cConfiguration" ContainerType="White" runat="server">
                                <Efficio:EfficioHeader ID="hConfiguration" Text="Configure" runat="server" />
                                <asp:CheckBox ID="chkEnableStageTasks" Text="Stage Tasks Enabled" ClientIDMode="Static" runat="server" />
                                <Efficio:EfficioButton ID="btnClose" Text="Close" OnClientClick="ConfigureStages();CloseHeaderMenu();return false;" runat="server"   />
                            </Efficio:EfficioContainer>
                        </ItemTemplate>
                    </Efficio:EfficioHeaderMenu>
                    <telerik:RadTabStrip ID="tsMain" SelectedIndex="0" MultiPageID="rmpMain" EnableEmbeddedSkins="False" Skin="EfficioSkin" Width="375" Align="Right" CssClass="tabStrip" OnClientTabSelected="tsMain_onTabSelected" runat="server">
                        <Tabs>
                            <telerik:RadTab PageViewID="pvGeneral" Text="Add Pending" Value="<%# TabName.Opportunity %>" runat="server" />
                            <telerik:RadTab PageViewID="pvActivity" Text="Add Activity" Value="<%# TabName.Activity %>" runat="server" />
                            <telerik:RadTab PageViewID="pvProposal" Text="Proposal" Value="<%# TabName.Proposal %>" runat="server" Visible="False" />
                            <telerik:RadTab PageViewID="pvHistory" Text="Activity History" Value="<%# TabName.History %>" Visible="false" runat="server" />
                        </Tabs>
                    </telerik:RadTabStrip>
                </ContentTemplate>
            </Efficio:EfficioHeader>            
            <br class="clear" />            
            <telerik:RadMultiPage ID="rmpMain" SelectedIndex="0" CssClass="radMultiPage multiPageContainer" runat="server">
                <telerik:RadPageView ID="pvGeneral" runat="server">

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadTabStrip, {"_align":2,"_selectedIndex":0,"_skin":"Default","clientStateFieldID":"ctl00_cphM_cHeader_hTitle_RadTabStrip1_ClientState","selectedIndexes":["0"],"tabData":[{"value":"Opportunity"},{"value":"Activity"}]}, null, null, $get("ctl00_cphM_cHeader_hTitle_RadTabStrip1"));
Dimitar Terziev
Telerik team
 answered on 12 Mar 2014
3 answers
461 views
In radEditor Q1 2014 AllowScripts marked as obsolete. How to correctly allow scripts in the editor content now?
Btw, I was not be able to find anything related in the online help.
Ianko
Telerik team
 answered on 12 Mar 2014
1 answer
177 views
I have defined an area on a page where I overlay other ASPX pages based on selection from a RadPanelBar. I update the ContentUrl setting in server-side code (VB) and this works well. The value is updated via Ajax.

I am wondering whether there is a cleaner way to achieve this same effect, as there is no associated TabStrip control, nor are there "multi" pages, just the one that defines the overlay zone.

Per the following example, I have shown the default content, and this is what gets updated.
​
<ItemTemplate>
     <div style="padding: 0px; margin: 0px; overflow: hidden; position: relative;">
         <telerik:RadMultiPage ID="RadMultiPage_About" runat="server" SelectedIndex="0">
         <telerik:RadPageView ID="RadPageView_About" runat="server" ContentUrl="minimal_about.aspx"  Height="460" Width="900">RadPageView</telerik:RadPageView>
         </telerik:RadMultiPage>
     </div>
 </ItemTemplate>
Princy
Top achievements
Rank 2
 answered on 12 Mar 2014
4 answers
196 views
I have a RadTabStrip which contains a multipage and several pageviews within that.  Is there an easy way to get a printer-friendly version of one of my pageviews?  In other words, I'd like to give the user a printer icon they can click on and that would in turn allow the user to just print off that one pageview instead of the whole page (i.e. get rid of the surrounding page content, tabstrip, etc.).
Shinu
Top achievements
Rank 2
 answered on 12 Mar 2014
1 answer
1.1K+ views
Hi,
I have a RadGrid like this: (only selective code is shown here for clarity..please bear)

 <telerik:RadGrid ID="MessageView" runat="server" AllowPaging="True" PageSize="50"
                                OnGroupsChanging="MessageView_GroupsChanging" OnNeedDataSource="MessageView_NeedDataSource"
                                AllowSorting="true" ShowGroupPanel="true" AutoGenerateColumns="False" GridLines="None"
                                OnItemDataBound="MessageView_ItemDataBound" OnItemCommand="MessageView_ItemCommand"
                                Width="916px">

  <ClientEvents OnRowDblClick="MessageViewDoubleClick"></ClientEvents>

 I have a column like this in RadGrid HTML:

    <telerik:GridTemplateColumn UniqueName="CustomerName">
                                            <ItemTemplate>
                                                <asp:Label ID="hdnLblCustomerName" Style="visibility: hidden;" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>

    ON SERVER SIDE... I am assigning the value to this label in  MessageView_ItemDataBound event  like this:
 
                   Label hdnLblCustomerName = (Label)e.Item.FindControl("hdnLblCustomerName");
                   hdnLblCustomerName.Value = Convert.ToString(dt.Rows[0]["CustomerName"]);



NOW, In the Client Side , i have written like this:

 function   MessageViewDoubleClick(sender, args) 
{
                   var dataItem = $get(args.get_id());
                 
                    var grid = sender;
                    var MasterTable = grid.get_masterTableView();
                    var row = MasterTable.get_dataItems()[args.get_itemIndexHierarchical()];
                
                    var cell = MasterTable.getCellByColumnUniqueName(row, "CustomerName");
                    var lblvalue = cell.innerHTML;
}


Till here everything is going right, my label got assigned with the correct value...and now I have to fetch this on the client side
BUT , now the problem is
 lblvalue is showing value like this
   <span id="MessageView_ctl00_ctl04_hdnLblCustomerName" style="visibility:hidden;">John</span>

but I need only "John" .

Please suggest how to achieve this.

Thanks.



Princy
Top achievements
Rank 2
 answered on 12 Mar 2014
1 answer
130 views
I would like to hide the description area, including the image count display.

All I want to show is contents of the ItemTemplate.
Shinu
Top achievements
Rank 2
 answered on 12 Mar 2014
1 answer
137 views
I have a bit of code that use to work until we upgraded to the newest version of the controls.
But the ability to pull the myTextBox._orginalValue no longer works... Is there a supported method for this in the latest build of the controls?

var saveIcon = $find(gridRowSaveIcon.id);
 
               var orginalValue = myTextBox._originalValue;
               if (orginalValue.length == 0) {
                   if (myTextBox._initialValue.length != 0)
                       orginalValue = myTextBox._initialValue;
               }

Princy
Top achievements
Rank 2
 answered on 12 Mar 2014
1 answer
148 views
We are using the RadDateInput for drivers license expiration date. Some users want to enter only the month and year such as 02/2014 but the control parses this to 3/2/2014 rather than 2/1/2014. Is there a workaround for this behavior?

Thanks

Charles
A2H
Top achievements
Rank 1
 answered on 11 Mar 2014
8 answers
92 views
This is probably the intended behavior, but if I have 2 grids on 2 different child pages with the same name (ID), then they will use the same settings.  If you're using RadGrid1 for all your grids in the child pages, this will screw things up.  I don't do that, but sometimes I uses the same name like gridOrders...  The easy solution and what I'm doing is to make the names unique.
I put the RadPersistenceManager on the master and use the proxy on the child pages.

I'm guessing that I just need to make the names unique and there probably isn't a fix you can do for this.
moegal
Top achievements
Rank 1
 answered on 11 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?