Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
192 views
hi

My company has a high turnover rate of employees and given the code sample telerik provided it is not dynamic for my situation. How do i make it dynamic without changing anything at the aspx page whenever there is a change at the employee table? thanks

 <ResourceTypes>
         <telerik:ResourceType KeyField="ID" Name="User" TextField="UserName" ForeignKeyField="UserID"
                        DataSourceID="UsersDataSource" />
  </ResourceTypes>
                <ResourceStyles>
                    <telerik:ResourceStyleMapping Type="User" Text="Alex" ApplyCssClass="rsCategoryBlue" />
                    <telerik:ResourceStyleMapping Type="User" Text="Bob" ApplyCssClass="rsCategoryOrange" />
                    <telerik:ResourceStyleMapping Type="User" Text="Charlie" ApplyCssClass="rsCategoryGreen" />
                </ResourceStyles>
Ryan Baxter
Top achievements
Rank 1
 answered on 30 Nov 2012
0 answers
100 views
As per the page below, RadUpload should have a "dir" property but i find it does not appear in intellisence options.  Why is that?

http://www.telerik.com/help/aspnet-ajax/upload-adupload-rtl-support.html
Also, i notice that instead of cicking the "Select" button to open a file explorer, i can just click the textbox beside the button.  Is that normal?
Stacy
Top achievements
Rank 1
 asked on 30 Nov 2012
1 answer
79 views
I have a radwindow that controls an aspx page.

<telerik:RadWindow ID="wndDownloadAccounts" runat="server" Title="Download Accounts" Skin="Web20" Width="500px" Height="270px"
    ReloadOnShow="true" ShowContentDuringLoad="false" Behaviors="Close" VisibleStatusbar="false" DestroyOnClose="false" NavigateUrl="~/Views/Accounts/DownloadAccountsWindow.aspx" />


The contents of DownloadAccountsWindow.aspx are as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DownloadAccountsWindow.aspx.cs" Inherits="Foo.FooBar.Views.Accounts.DownloadAccountsWindow" MasterPageFile="~/Resources/MasterPages/Bare.Master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ContentPlaceHolderID="CP1" runat="server">
 
    <script type="text/javascript">
 
        function InitAccountsData() {
            var data = getRadWindowParent().GetAllAccountsData();
            $get('<%= allAccountsData.ClientID %>').value = data;
        }
 
        function OnTypeChanged(sender, args) {
            // <%-- This is vestigial code. --%>
            var selected = sender.get_selectedItem().get_text();
        }
     
    </script>
     
    <asp:HiddenField ID="allAccountsData" runat="server" />
 
    <div style="padding: 10px;">
     
        <table cellpadding="5">
            <tr>
                <td>Download Type</td>
                <td>
                    <telerik:RadComboBox ID="cmbDownloadType" Width="200px" runat="server" Skin="Vista" OnClientSelectedIndexChanged="OnTypeChanged" OnClientLoad="OnTypeChanged" >
                        <Items>
                            <telerik:RadComboBoxItem Text="Morningstar Office" Value="Morningstar" />
                            <telerik:RadComboBoxItem Text="Morningstar Principia" Value="Principia" />
                            <telerik:RadComboBoxItem Text="Morningstar Principia CAMS" Value="CAMS" />
                            <telerik:RadComboBoxItem Text="Orion" Value="Orion" />
                            <telerik:RadComboBoxItem Text="EbixCRM SmartOffice" Value="SmartOffice" />
                        </Items>
                    </telerik:RadComboBox>                 
                </td>
            </tr>
            <tr>
                <td>As-Of Date</td>
                <td>
                    <telerik:RadDatePicker ID="dateAsOf" runat="server" Skin="Vista" />
                </td>
            </tr>          
        </table>
        <br />
        <center>
            <asp:Button ID="btnDownload" runat="server" Text="Download" Width="100px" OnClick="btnDownload_Click" />
                
            <input type="button" value="Close" style="width:100px;" onclick="getRadWindow().close()" />
        </center>
     
    </div>
     
    <script>
 
        InitAccountsData();
     
    </script>
 
</asp:Content>

When I navigate directly to the aspx, I get the following result:
Direct Link

When I load up the aspx in the radwindow I get the following:
In radwindow

Any item that is selected is not shown in the radcombobox when I load this aspx in a radwindow.

Is there a known issue with Radwindows and radcomboboxes?
Nencho
Telerik team
 answered on 30 Nov 2012
3 answers
414 views
Hi,
I am using Radgrid with grouping. How i can group by two columns that should used in the <GroupHeaderTemplate> as following example.

I year  students                  ( Group by Year)

Science ( Group by Department)

Name

Student ID

 Avg mark

XXX

11111111

89

YYY

22222222

56

Maths ( Group by Department)

Name

Student ID

Avg mark

GGG

3333333

83

HHH

3333333

68

II year  students                  ( Group by Year)

Science ( Group by Department)

Name

Student ID

 Avg mark

XX

111111

99

YY

222222

87


Thanks

Eyup
Telerik team
 answered on 30 Nov 2012
8 answers
1.7K+ views
Hi,

I have user control, in which  have "Add" button. now i,m calling this user control in my page and firing click event of Add button (which is in the user control)

       protected void Page_Init(object sender, EventArgs e)
        {
            HeaderToolBar1.Add_Event += new WFSite.ViewControls.HeaderToolBar.AddDelegate(HeaderToolBar1_Add_Event);
          }

        void HeaderToolBar1_Add_Event(object sender, RadToolBarEventArgs e)
        {
           // How to open radwindow popup
        }


Thank you
Ravi
Danail Vasilev
Telerik team
 answered on 30 Nov 2012
1 answer
108 views
I'm working off of the demo here:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/modality/defaultvb.aspx

Everything is working but the serverside code.  Here's a snippet of the aspx:

<telerik:RadToolTip ID="RadToolTip2" runat="server" Modal="true" ShowEvent="FromCode"
        Position="TopCenter" RelativeTo="BrowserWindow" OnClientBeforeHide="OnClientBeforeHide"
        HideEvent="FromCode" ShowCallout="False">
 
        <asp:UpdatePanel runat="server" ID="UpdatePanel2" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Panel ID="pnlScheduleAddReport" runat="server" Style="padding-left: 11px;">
 
                <h5>Schedule A New Report</h5>
                <telerik:RadComboBox ZIndex="999999" ID="ddScheduleReportName" Label="Report:" runat="server" DataSourceID="SQLDataSource1" AllowCustomText="false" DataValueField="id" DataTextField="reportname" Width="275px">
                </telerik:RadComboBox>
                <telerik:RadComboBox ZIndex="999999" ID="ddScheduleReportFrequency" Label="Frequency:" runat="server" DataSourceID="SQLDataSource3" AllowCustomText="false" DataValueField="id" DataTextField="frequencyDesc" Width="140px"
                OnSelectedIndexChanged="ddScheduleReportFrequency_SelectedIndexChanged" AutoPostBack="true">
                </telerik:RadComboBox>
                <telerik:RadComboBox ZIndex="999999" ID="ddScheduleReportParam" Label="Run Every:" runat="server" AllowCustomText="false" Width="165px">
                </telerik:RadComboBox>
                <br /><br />
                    <asp:Label ID="lblScheduleReportError" runat="server" Text="error label" Visible="false"></asp:Label><br />
             
            <telerik:RadButton ID="btnScheduleAddSubmit" runat="server" Text="Add Report To Schedule" OnClick="btnScheduleAddSubmit_Click" AutoPostBack="true">
            </telerik:RadButton>
 
            <telerik:RadButton ID="btnScheduleAddCancel" runat="server" Text="Cancel" OnClick="btnScheduleAddCancel_Click">
            </telerik:RadButton>
                     
                </asp:Panel>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnScheduleAddReport" EventName="Click"></asp:AsyncPostBackTrigger>
            </Triggers>
        </asp:UpdatePanel>
</telerik:RadToolTip>

and here's the code for the postback:

Protected Sub btnScheduleAddSubmit_Click(sender As Object, e As System.EventArgs) Handles btnScheduleAddSubmit.Click
 
         
 
        Dim strConn As String = System.Configuration.ConfigurationManager.ConnectionStrings("XXXXX").ConnectionString
        Dim strSQL As String = "INSERT INTO TABLE (fld1, fld2, fld3, fld4) VALUES (@userID, @reportID, @reportFrequencyID, @reportFrequencyParam)"
 
        Dim oConn As New Data.SqlClient.SqlConnection(strConn)
        Dim oCmd As New Data.SqlClient.SqlCommand(strSQL, oConn)
 
        With oCmd.Parameters
            .Add(New SqlClient.SqlParameter("@fld1", Session("userID")))
            .Add(New SqlClient.SqlParameter("@reportID", ddScheduleReportName.SelectedValue))
            .Add(New SqlClient.SqlParameter("@reportFrequencyID", ddScheduleReportFrequency.SelectedValue))
            .Add(New SqlClient.SqlParameter("@reportFrequencyParam", ddScheduleReportParam.SelectedValue))
        End With
        oConn.Open()
        oCmd.ExecuteNonQuery()
        oConn.Close()
                      bindReportSchedule()
                
        'If Not ddScheduleReportName.Equals(String.Empty) AndAlso Not ddScheduleReportFrequency.Equals(String.Empty) AndAlso Not ddScheduleReportParam.Equals(String.Empty) Then
 
            Dim script As String = "toHide = true;GetActiveToolTip().hide()"
            ScriptManager.RegisterStartupScript(Me.Page, GetType(Page), "scriptKey", script, True)
            Me.lblScheduleReportError.Visible = False
 
        'Else
            'Me.lblScheduleReportError.Text = "Please select a Report, Frequency, and Frequency Parameter field before submitting."
            'Me.lblScheduleReportError.Visible = True
        'End If
    End Sub

Oddly (or maybe not) the postback for the 2nd dropdown (ddScheduleReportFrequency) works perfectly.  I don't see why the click button event (btnScheduleAddSubmit)wouldn't work as well.  What am I doing wrong?

Thanks.
Slav
Telerik team
 answered on 30 Nov 2012
0 answers
175 views
I'm using a RadTabStrip with RadPageView that brings up pages via the ContentUrl.  I have a javascript function on the pages which does a resize of the page.  I use the window events of load and onload within those pages to trigger my resize javascript function.  It works the first time each time tab is clicked, but not when you go back and click a tab that was already clicked once.  I was able to get it to work by using AutoPostBack=True in the RadTabStrip, but I do a lookup to a database for each page so I don't want to keep doing the same lookups over and over.  Any suggestions?  I realize using the ContentUrl it creates an iFrame, so it gets a tad interesting.
Dwight
Top achievements
Rank 1
 asked on 30 Nov 2012
2 answers
85 views
Hi
usign MetroTouch skin the scheduler header becomes black instead of blue.
Is there a easy way to fix this?

Best Regards
Lorenzo Margola
Top achievements
Rank 1
 answered on 30 Nov 2012
1 answer
273 views
Good afternoon I have a problem when selecting multiple files in Radasyncupload, everything works perfectly, plus the selection of multiple files with CTRL not working since I enabled MultipleFileSelection = "Automatic" more still does not work when the dialogue continues I'm using the code
<telerik:RadAsyncUpload runat="server" AllowedFileExtensions=".jpg,.png" MultipleFileSelection="Automatic"
                                                    ID="rupImagens" TemporaryFolder="~/Maquinas/Dealer/Anexos/Foto/Tradin" Width="210px"
                                                    Culture="Portuguese (Brazil)" Skin="Default" MaxFileInputsCount="50" OverwriteExistingFiles="true"
                                                    OnFileUploaded="OnFileUploaded" OnClientFilesUploaded="OnFileUploaded" OnClientFileUploading="DesabilitaIbtInserir">
                                                    <Localization Remove="Remover" Select="Procurar..." Add="Adicionar" Clear="Limpar"
                                                        Delete="Deletar" />
                                                </telerik:RadAsyncUpload>

Att..
Plamen
Telerik team
 answered on 30 Nov 2012
1 answer
73 views
Hi,

I've been using the Upload contol for some time to add attachments to knowledgebase articles. Much of the page is ajaxified, and the I've been using (successfully in the past), the OnClientFileSelected event to force a postback which then does something serverside with the uploaded file.

I am now using Q1 2012 controls and this functionality no longer works. I've read the articles explaining that a full postback is required.. and this is happening, yet serverside there never appears to be anything in the UploadedFiles collection.

Clientside code calls a JS function which performs a manual postback using a hidden control ID as the argument.

Serverside RaisePostBackEvent correctly responds to this postback, at which point the UploadedFiles collection is still empty. previously this was working.

Any pointers?
Thanks.
Plamen
Telerik team
 answered on 30 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?