Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
137 views
I've set up a tabstrip in the pager template of a formview and bound it to a SQLDatasource.  I then set up a server side OnTabClick event to change the page of the formview.  This works great.  The only issue I'm having is displaying the selected tab.  It seems to only work if I click the same tab twice.  I've tried setting the selected tab in the tabclick event and in the page_load event to to avail.  Does anyone have any ideas?
 
Here is my code, including the tab.selected property in the event.  The functionality is the same with or without that line.

<telerik:RadTabStrip ID="RadTabStrip2" runat="server" 
     DataSourceID="SqlDataSource5" DataTextField="proj_no" 
     ontabclick="RadTabStrip2_TabClick">  
</telerik:RadTabStrip> 
 
    Protected Sub RadTabStrip2_TabClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTabStripEventArgs)  
        FormView3.PageIndex = e.Tab.Index  
        e.Tab.Selected = True 
    End Sub 


Thanks.
Brian
Top achievements
Rank 1
 answered on 22 Jul 2010
4 answers
319 views
Hi Telerik,

Am using the new telerik controls in my web application. But am facing the issue with auto adjustment of RadSplitter.

Am using Splitter and RadPane
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="RR_Web.Site1" %>
  
<%@ 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>   
    <script type="text/javascript" src="../RR.js"></script>
    <link href="App_Themes/Default/Grid.InspireGrid.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/Default/TabStrip.InspireTabStrip.css" rel="stylesheet" type="text/css" />
</head>
  
<script language="javascript" type="text/javascript">
    function pnlRequestStarted(ajaxPanel, eventArgs)
    //AJAX
    {
        var sPath = window.location.pathname;
        var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
  
        for (i = 0; i < document.forms[0].elements.length - 1; i++)
        //search for "FILE" textbox where upload filename is stored
        //if this field is not empty, meaning that file is being uploaded
        //once then, must disable AJAX for the upload to work properly.
        //This does not work if the page is using a Wizard and the upload component is not in first wizard step.
            if (document.forms[0].elements[i].type == "file")
                eventArgs.EnableAjax = false;
              
        //TODO: these pages require file uploading. AJAX must be disabled for upload to work.
        if (sPage == "NewScenario.aspx" || sPage == "NewActivation.aspx" || sPage == "ContactsMgmt.aspx")
            eventArgs.EnableAjax = false;
    }   
</script>
  
   
  
  
<body>
  
    <form id="form1" runat="server">
     
    <asp:ScriptManager ID="ScriptManager1" runat="server"  EnablePartialRendering="true">
    </asp:ScriptManager>
      
   <table border="0" cellspacing="0" cellpadding="0" class="HeaderBg" width="100%">
            <tr style="height: 50px">                   
                <td class="HeaderBg" style="width: 100%">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <tr
                        <td width="300px" valign="middle" align="left"> <a style="font-weight: bold; font-size: larger">Welcome to Rapid Recall</a> </td>
                        <td width="50px" nowrap="nowrap">   </td>
                        <td valign="middle" align="left">
                             <table border="0" cellpadding="6" cellspacing="0">
                             <tr>
                                    <td align="center"><asp:ImageButton ID="btnkNewContact" runat="server" ImageUrl="~/Images/newContact.gif" Visible="false" onclick="btnkNewContact_Click" /></td>  
                                    <td align="center"><asp:ImageButton ID="btnkNewScenario" runat="server" ImageUrl="~/Images/newScenario.gif" Visible="false" onclick="btnkNewScenario_Click" /></td>
                                    <td align="center"><asp:ImageButton ID="btnNewActivation" runat="server" ImageUrl="~/Images/newActivation.gif" Visible="false" onclick="btnNewActivation_Click" /></td>
                                    <td align="center"><asp:ImageButton ID="btnhUserMgmt" runat="server" ImageUrl="~/Images/usersMgmt.gif" Visible="false" onclick="btnhUserMgmt_Click" /></td>
                             </tr>
                             <tr>
                                    <td><asp:Literal ID="lblNewContact" runat="server" Text="New Contact" Visible="false"></asp:Literal></td>
                                    <td><asp:Literal ID="lblNewScenario" runat="server" Text="New Scenario" Visible="false"></asp:Literal></td>
                                    <td><asp:Literal ID="lblNewActivation" runat="server" Text="New Activation" Visible="false"></asp:Literal></td>
                                    <td><asp:Literal ID="lblUsersMgmt" runat="server" Text="Users Mgmt." Visible="false"></asp:Literal></td>
                             </tr>
                             </table>
                        </td>
                        <td valign="top" width="200px" align="right"> <asp:Label ID="lblDateTime" runat="server"></asp:Label> </td>
                    </tr>
                    </table>                    
                </td>
            </tr>           
            <tr>
                <td class="titleBarBg">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td style="width: 20px; height: 19px;">
                                <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/pgtitleimage.gif" />
                            </td>
                            <td style="width: 400px; height: 19px;" nowrap="nowrap" align="left">
                                 <asp:Label ID="lblTitle" runat="server" CssClass="titleBar"></asp:Label>
                            </td>
                            <td width="500px" align="right" valign="middle">                
                                        <asp:Label ID="lblUsername" runat="server"></asp:Label> | 
                                        <asp:HyperLink ID="hlnkChgPwd" runat="server" NavigateUrl="~/ChangePassword.aspx" Text="Change Password"></asp:HyperLink> |
                                        <asp:HyperLink ID="hlnkAccountInfo" runat="server" NavigateUrl="~/CreateUser.aspx" Text="Account Info"></asp:HyperLink> |
                                        <asp:HyperLink ID="hlnkLogout" runat="server" NavigateUrl="~/Logout.aspx" Text="Logout"></asp:HyperLink>
                            </td
                        </tr>
                    </table>
                </td>               
            </tr>
            <tr>
                <td valign="top" align="left" width="100%">                
                <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%">                    
                    <telerik:RadPane ID="RadPaneMenus" runat="server" Width="200px" Scrolling="None" MinWidth="250" MaxWidth="250">
                                <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="FullExpandedItem" OnItemClick="RadPanelBar1_ItemClick" Height="100%">
                                <Items>
                                        <telerik:RadPanelItem Text="Manage Contacts" ImageUrl="Images/mngContacts.png" Visible="false">
                                            <Items>
                                                <telerik:RadPanelItem NavigateUrl="ContactsMgmt.aspx" Text="Manage Contacts" />
                                                <telerik:RadPanelItem NavigateUrl="ImportContacts.aspx" Text="Import Contacts" />
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="Scenarios" ImageUrl="Images/mngScenarios.png" Visible="false">
                                            <Items>
                                                <telerik:RadPanelItem NavigateUrl="Scenarios.aspx" Text="Scenarios" />
                                                <telerik:RadPanelItem NavigateUrl="NewScenario.aspx" Text="New Scenario" />
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="Activations" ImageUrl="Images/mngActivations.png" Visible="false">
                                            <Items>
                                                <telerik:RadPanelItem NavigateUrl="Activations.aspx" Text="Activations" />
                                                <telerik:RadPanelItem NavigateUrl="NewActivation.aspx" Text="New Activation" />
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="Manage Users" ImageUrl="Images/mngUsers.png" Visible="false">
                                            <Items>
                                                <telerik:RadPanelItem NavigateUrl="UserList.aspx" Text="Manage Users" />                                                
                                            </Items>
                                        </telerik:RadPanelItem
                                </Items>                                
                                </telerik:RadPanelBar
                    </telerik:RadPane>
                      
                    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>                    
                    <telerik:RadPane ID="radPaneContent" runat="server" Width="100%">
                        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                        </asp:ContentPlaceHolder>
                    </telerik:RadPane>                
                </telerik:RadSplitter>                
                </td>
            </tr>
            <tr>
                <td class="skinfooter">
                                <asp:HyperLink ID="HyperLink5" runat="server" Text="© Copyright 2000-2010 Inspire-Tech Pte Ltd. All Rights Reserved."
                                    NavigateUrl="http://www.inspire-tech.com"></asp:HyperLink>
                </td>
            </tr>
        </table>
      
    </form>
</body>
</html>
and RadPanelBar. I want the RadSplitter auto increase to page content. I tried to height Offset attribute still i can't get the results.

Down side am placing my master page code. please check let me know how to set the splitter height auto set to the content place holder height. i don't want to see the vertical scroll bar in content place holder rad pane.

 

Tsvetie
Telerik team
 answered on 22 Jul 2010
4 answers
255 views
Hi,

I have a radGrid which I want to be multilingual. I want to change the pager text based on the culture. I am unable to find properties which does this. Given below are the text that is displayed on my radgrid pager which i want to change based on culture.

Change page    label
Go                     link
Page size
          label
Change             link
Displaying page 1 of 3, items 1 to 10 of 21   label.

could you please let me know what properties that needs to be set on the radgrid in order to change the above values??


Thanks,
Mahesh
mahesh
Top achievements
Rank 1
 answered on 22 Jul 2010
3 answers
151 views
I  want to show msgbox after save data to  database  and not show msgbox when post back again after save data.
Now I use "RadAjaxManager1.ResponseScripts.Clear()"  for clear msgbox .. but  msgbox show alway after save data..
Pls help me ..

Page Load
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load   
        If Not Page.IsPostBack Then  
            ConnectPreFix()
            ConnectUserGroup()
            CheckLevelGroup(gLevel)
             .....
        Else
            RadAjaxManager1.ResponseScripts.Clear()
        End If  
    End Sub

Insert Data

 

Sub InsertData()
  Dim Result As Boolean
 Try
   StrSql="..."
   Result = DbPortal.QueryExecuteNonQuery(StrSql)
    ....
   Catch ex As Exception
            LblError.Text = " InsertData :" & ex.Message
            PanelError.Visible = True  
   Finally           
            ShowMsg("Insert Data Complete !")
            PanelError.Visible = False
   End Try

 

End Sub

 

 

 

Show Msg

 

 

Sub ShowMsg(ByVal sMsg As String  
RadAjaxManager1.ResponseScripts.Add("Sys.Application.add_load(function()" & Chr(13)& "" & Chr(10) & " {radalert('" & sMsg & "', 330, 210);})"  
End Sub

 

 

 



 

Petio Petkov
Telerik team
 answered on 22 Jul 2010
1 answer
81 views
I have a requirment, I need to have a dropdown list which will contains values form 1 to 4.
Based on what user selects from it, I need to add same number  Dockzone control to my asp.net page.

I want to know is it possible to do, I did add Dock controls at the runtime and they are working fine on another page.
But i am not sure about the dockzone controls.

Petio Petkov
Telerik team
 answered on 22 Jul 2010
5 answers
104 views

Hi everybody!

I was following this demo, to understand how to implement RadInput's properties and functionallity to GridBoundColumns TextBoxes, and I found it very interesting.

However in the demo there isn't an example about how to use ClientEvents (like OnKeyPress or OnBlur) for that scenario.

I would like to do something like this OnKeyPress with a couple columns inside a RadGrid, but nothing seems to happen. I even include an alert function inside the AlphabetOnly function, but it doesn´t show.

Is it possible to use RadIpuntManager's ClientEvents in these cases?


Thanks a lot!
Carlos Contreras
Top achievements
Rank 1
 answered on 22 Jul 2010
2 answers
202 views
Internet Explorer allows you to set / resize the height of a radwindow to be very small, even down to 0px. However, every other browser I've tested only allows the height to go down to about 100 pixels. Am I missing something obvious or does anyone know a workaround to make a radwindow's height about 50px on every browser? Thanks!
Jim
Top achievements
Rank 1
 answered on 22 Jul 2010
1 answer
139 views
I have a gridview in a radgrid and I need to export the contents to a PDF.  Everything but the nested gridview is exporting.  When viewing the page, the grid is databound (but not when exporting to pdf).  See code below:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage-blank.master" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<script runat="server">
 
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        RadGrid1.ExportSettings.ExportOnlyData = False
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.ExportSettings.OpenInNewWindow = False
        RadGrid1.BorderStyle = BorderStyle.None
        RadGrid1.MasterTableView.BorderStyle = BorderStyle.None
        RadGrid1.MasterTableView.DataBind()
        RadGrid1.MasterTableView.ExportToPdf()
    End Sub
</script>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
        DataSourceID="SqlDataSource1" GridLines="None">
        <MasterTableView datakeynames="SchoolWalkID" datasourceid="SqlDataSource1">
            <Columns>
                <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                    <ItemTemplate>
                    This text exports to PDF.  The grid below binds correctly when viewing the page a browser.  When exporting to PDF, the grid is not exported.
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                            DataSourceID="SqlDataSource2" EnableModelValidation="True">
                        </asp:GridView>
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                            ConnectionString="<%$ ConnectionStrings:SQLcmsConnection %>"
                            SelectCommand="SELECT * FROM [Schools]"></asp:SqlDataSource>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:SQLcmsConnection %>"
        SelectCommand="SELECT * FROM [Schools_Walks]"></asp:SqlDataSource>
</asp:Content>

Daniel
Telerik team
 answered on 22 Jul 2010
1 answer
164 views
Hi All,

For the visualization and selection of certain pages I use a RadGrid solution.
(The list is based on a recursive SharePoint SPSiteDataQuery on site.rootweb with Webs Scope = Recursive. )

One of the columns is made for "sorting"

This is a numeric (Editable) field in which the user can insert a number 1, 2, 3 etc.
This number is the order in which the selected information should come out of the Grid. 
See the radgrid.png for clarification

So if 5 items are selected and only two have a number, then these two have the highest "prio" and should be first in the
foreach (string gridIndex in NieuwsbrievenGrid.SelectedIndexes)
{ }

Additional info: User will only emphasize on the "important" items. The other selected items will not get a number so ordering here can just be "default"

How can I accomplish this.
I tried to use the GridSortExpression on the "itemVolgorde" column but this doesn't work..

Thank you in advance.
Veli
Telerik team
 answered on 22 Jul 2010
1 answer
193 views
Hi Team,

I have a problem with which i would like some assistance if possible.

I created a page in which the user can apply for a job vacancy. The page is a wizard like page which contains a RadMultiPage and a Loading panel as follows:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" IsSticky="true" Transparency="10"
            Style="text-align: center; position:absolute; vertical-align: middle; z-index: 100; background-color: #E9EAEA; width:680px">
            <asp:Image runat="server" ID="LoadingImage1" ImageUrl="~/Images/boxLoading.gif" AlternateText="Loading..."
                Style="margin-top: 200px;" />
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1">
            <div style="float: left; width: 100%">
                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated"
                    CssClass="multiPage" RenderSelectedPageOnly="true">
                </telerik:RadMultiPage>
            </div>
        </telerik:RadAjaxPanel>
    </div>
</asp:Content>

The Views for the RadMultiPage are loaded dynamically following this example http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx. The problem is that the Loading panel doesn't get the proper HEIGHT according to each View. Some of the view contain collapsible panels other don't. I tried to set the height as percentage (say 100%) but it always uses the 100% of the initially loaded View (the first view). How can I make the loading panel to always cover the RadMultiPage careless of which view is being displayed and what is the height of the view ...

I appreciate it in advance ...

Best,

George Saadeh

Iana Tsolova
Telerik team
 answered on 22 Jul 2010
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?