Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
71 views
Hello all

We're using a fairly oldish release (2010.3.1317.40) on Windows 7 using IE9.  I am fairly new to the code base I'm looking at as I'm looking it as an outsider for a sister company to try and sort out some issues.

We're having a problem with performance when resizing a window as a RadGrid with a 1000 rows.  It takes a good number of seconds to resize.  Searching through the forums I found that setting RadResizeStopLookup="true" RadShowStopLookup="true" in the <div> following the RadGrid definition may ease these problems.

However, our RadGrid is being created in C# and being placed on the page dynamically (not sure of the exact mechanism -- this software generates forms from data in the database) and so there is not aspx file holding the grid.  Is there a way of setting these attributes from within C# on the RadGrid object itself?

Thanks in advance for any ideas anyone has.
Ian
Top achievements
Rank 1
 answered on 08 Jun 2012
1 answer
269 views
how can i validate telerik radupload for mimeTypes -> mean Prevent Change Extension by users!  
in both Client and Server sides!  
my radupload is like this :  

<telerik:RadUpload ID="RadUpload" runat="server" EnableEmbeddedSkins="False" Skin="BlackByMe" AllowedFileExtensions=".txt" AllowedMimeTypes="text/plain"
    ControlObjectsVisibility="ClearButtons" Width="325px">
</telerik:RadUpload>


as you the `AllowedFileExtensions` is txt.  
but i can change a zip file extension to txt and upload it.  
how can i prevent this act?  
there are many methods out there for Telerik RadUpload Validation Such As FileExtension-FileSize-Empty RadUpload.  
but what about validating of real MiMeType? 

there is a note in telerik web site :  
RadUpload does not determine the mime-type using only the file extension. For example if you try to upload a text file that has the extension ".JPG", it is still uploaded with text/plain mime-type.
so why i can still upload a pciture (i zipped it and changed it's extention to txt) with readupload upper?
as you see i set AllowedMimeTypes property. 
what is the problem? 

i want to show a message to that user who change file extension(clietn and server side for learning)

thanks in advance
Kevin
Top achievements
Rank 2
 answered on 08 Jun 2012
1 answer
69 views
 I would like to select multiple rows in a grid view and move them down within the grid view 
 by dropping.  Is there a way to do that ? Please advice.
Eyup
Telerik team
 answered on 08 Jun 2012
1 answer
136 views
Hi,
I have a RadComboBox with 5 checkbox inside.When user click on the checkbox, my program will perform some business logic checking and feedback to user.

However the problem i face is, everytime user click on the checkbox, the whole page will refresh and all the gui need to reload again.
Even I have set not to refresh the whole page when user click on the checkbox. Below is my code.
<ajax:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server">
      <ClientEvents OnRequestStart="onRequestStart" />
      <AjaxSettings>
       <ajax:AjaxSetting AjaxControlID="chkPoCat">
             <UpdatedControls>
              <ajax:AjaxUpdatedControl ControlID="DdlPoCat" />                   
              </UpdatedControls>
       </ajax:AjaxSetting>
 
 <ajax:AjaxSetting AjaxControlID="DdlPoCat">
             <UpdatedControls>
                  <ajax:AjaxUpdatedControl ControlID="DdlPoCat" />
              </UpdatedControls>
       </ajax:AjaxSetting>
 
      </AjaxSettings>
  </ajax:RadAjaxManager>
          
  <ajax:RadComboBox ID="DdlPoCat" runat="server" Width="240px"  AllowCustomText="false"  EnableVirtualScrolling="true"  EnableLoadOnDemand="True" Text=" " OnClientKeyPressing="clickButton">                        
                          <ItemTemplate>
                              <asp:CheckBox runat="server" ID="chkPoCat"  oncheckedchanged="chk_CheckedChangedPoCat" AutoPostBack="True" Text='<%#Eval("ParamDesc")%>' />
                          </ItemTemplate>
                      </ajax:RadComboBox>

Can anyone help? I have search online for few days but no solution on this. HELP PLEASE !!
Ivana
Telerik team
 answered on 08 Jun 2012
4 answers
84 views
Hi, what control you use in your home as a show? thanks
Miky
Michele
Top achievements
Rank 2
 answered on 08 Jun 2012
1 answer
166 views
I'm trying to fix a site I didn't build and I can't figure out why this data is not binding. It's a tool tip inside of a repeater and the tool tip has a control in it. Here is the code.

<telerik:RadToolTip ID="PaperRevTooltip" runat="server" ManualClose="True" Modal="True"
            Position="Center" RelativeTo="BrowserWindow" ShowEvent="FromCode" Skin="Telerik"
            Title="Reviewers" Width="400" Height="400">
            <asp:Repeater ID="Repeater1" runat="server">
                <HeaderTemplate>
                    <table border="0" cellpadding="0" cellspacing="5">
                </HeaderTemplate>
                <ItemTemplate>
                    <UC1:UControl ID="test3" runat="server" PaperID='<%# DataBinder.Eval(Container.DataItem, "PaperID")%>'
                        ReviewerID='<%# DataBinder.Eval(Container.DataItem, "ReviewerUserID")%>' reviewId='<%# DataBinder.Eval(Container.DataItem, "ReviewOfPaperID")%>' />
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
            <asp:SqlDataSource ID="ReviewersSqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:conferencehubConnectionString %>"
                SelectCommand="admin_PaperReviewers" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:Parameter Name="PaperID" Type="Int16" DefaultValue="0" Direction="Input" />
                </SelectParameters>
            </asp:SqlDataSource>
        </telerik:RadToolTip>

Here is the relevant code behind for that page. note the item command comes from a rad grid the tool tip shows, but with nothing but the title
Protected Sub item_command(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles PapersGV.ItemCommand
       Dim index As Integer
       Dim paperID As String
       If e.CommandName = "changeRev" Then
           index = e.Item.ItemIndex
           paperID = Me.PapersGV.Items(index).GetDataKeyValue("PaperID")
           Me.PaperRevTooltip.Title = Me.PapersGV.Items(index).GetDataKeyValue("PaperTitle")
 
           loadPaperReviewersData(paperID)
 
           Me.PaperRevTooltip.visible = True
           Me.PaperRevTooltip.Show()
       Else
           Me.PaperRevTooltip.visible = False
       End If
   End Sub
Protected Sub loadPaperReviewersData(ByVal paperID As String)
       Dim dt As DataTable
       Dim connString As String = System.Configuration.ConfigurationManager.ConnectionStrings("conferencehubConnectionString").ToString
       Dim myConnection As New Data.SqlClient.SqlConnection(connString)
       Dim strSQL As String = "admin_PaperReviewers"
       Dim selectCommand As New Data.SqlClient.SqlCommand(strSQL, myConnection)
       Dim SQLReader As SqlDataReader
       Dim paperIDParam As SqlParameter
       Dim values() = {"-1", "-1", "0", paperID, ""}
       Try
           selectCommand.CommandType = Data.CommandType.StoredProcedure
           paperIDParam = New SqlParameter("PaperId", Data.SqlDbType.Int)
           paperIDParam.Value = paperID
           selectCommand.Parameters.Add(paperIDParam)
           myConnection.Open()
           SQLReader = selectCommand.ExecuteReader()
           dt = New DataTable
           dt.Load(SQLReader)
           myConnection.Close()
 
           'While dt.Rows.Count < minReviewers
           If dt.Rows.Count < maxReviewers Then
               dt.Rows.Add(values)
           End If
 
           'End While
 
           Me.paperReviewersDT = dt
           Me.Repeater1.DataSource = dt
           Me.Repeater1.DataBind()
       Catch ex As Exception
           Response.Write("There has been an error.<br />" & ex.ToString & "<Br />" & strSQL)
       Finally
           myConnection.Close()
       End Try
   End Sub
   Private Property paperReviewersDT() As DataTable
       Get
           Return CType(ViewState("allRevs"), DataTable)
       End Get
       Set(ByVal value As DataTable)
           ViewState("allRevs") = value
       End Set
   End Property


Here is the control uc1
    <td>test
        <asp:Label ID="output" runat="server"></asp:Label>
        <asp:DropDownList ID="RevDropDownList" runat="server" DataSourceID="TrackSqlDS" DataTextField="ReviewerName"
            DataValueField="UserID">
        </asp:DropDownList>
        <asp:CustomValidator ID="revValidator" runat="server" ErrorMessage="*"></asp:CustomValidator>
    </td>
    <td>
        <asp:Button ID="AddButton" runat="server" Text="Add" CommandName="AddReviewer" />
     
        <asp:Button ID="DelButton" runat="server" Text="Delete" CommandName="DeleteReviewer"
            Visible="false" />
     
        <asp:Button ID="UpdateButton" runat="server" Text="Update" CommandName="UpdateReviewer"
            Visible="false"/>
    </td>
    <asp:SqlDataSource ID="TrackSqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:conferencehubConnectionString %>"
        SelectCommand="admin_AllReviewers" SelectCommandType="StoredProcedure" OnSelecting="TrackItDataSource_Selecting">
        <SelectParameters>
            <asp:Parameter Name="PaperID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</tr>

And the control code
    Private _ReviewerID As Integer
    Private _ReviewID As Integer
    Public Property reviewId() As Integer
        Get
            Return CType(ViewState("reviewId"), Integer)
        End Get
        Set(ByVal value As Integer)
            ViewState("reviewId") = value
        End Set
    End Property
 
    Public Property PaperID() As Integer
        Get
            Return CType(ViewState("paperId"), Integer)
        End Get
        Set(ByVal value As Integer)
            ViewState("paperId") = value
        End Set
    End Property
    Public Property ReviewerID() As Integer
        Get
            Return Me.RevDropDownList.SelectedItem.Value
        End Get
        Set(ByVal value As Integer)
            _ReviewerID = value
        End Set
    End Property
    Public ReadOnly Property ReviewerName() As String
        Get
            Return Me.RevDropDownList.SelectedItem.Text
        End Get
    End Property
#Region "SQLDS Events"
    Protected Sub TrackItDataSource_Selecting(ByVal sender As Object, ByVal e As SqlDataSourceSelectingEventArgs)
        e.Command.Parameters.Item(0).Value = PaperID
    End Sub
#End Region
    Protected Sub rev_Bound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RevDropDownList.DataBound
        Dim defaultItem As New ListItem("- Select Reviewer -", "-1")
        RevDropDownList.Items.Insert(0, defaultItem)
        output.Text = "test"
        If _ReviewerID <> 0 Then
            RevDropDownList.Items.FindByValue(_ReviewerID).Selected = True
        End If
 
        If isValid() Then
            AddButton.Visible = False
            UpdateButton.Visible = True
            DelButton.Visible = True
        End If
    End Sub
    Public Function isValid() As Boolean
        If RevDropDownList.SelectedIndex = 0 Then
            revValidator.IsValid = False
            Return False
        Else
            Return True
        End If
    End Function
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RevDropDownList.DataBind()
        output.Text = "test"
    End Sub
    Protected Sub AddButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddButton.Click
        If isValid() Then
            ReviewerID = Me.RevDropDownList.SelectedItem.Value
        End If
    End Sub

I'm kind of lost as to why not even the text "test" shows up when you show the tool tip.









Marin Bratanov
Telerik team
 answered on 08 Jun 2012
1 answer
93 views
See image. In the new empty application is layout of calendar right. But in other my application line of name of days is bad layout. Do you know what with this?
Zbysek
Top achievements
Rank 1
 answered on 08 Jun 2012
3 answers
167 views
I'm using a radtreeview inside a combobox, and I'm using the following code for the OnClientNodeClicking event clientside.

The problem is that server side btnSearch_Click event the dropdown always returns the selected value as null.

Any help would be greatly appreciated.

function OnRadTreeViewInComboBoxNodeClicking(sender, args) {
    var dropdownId = $('#' + sender.get_id()).closest('.RadComboBoxDropDown').attr('id').replace('_DropDown', '');
    var comboBox = $find(dropdownId);
 
    var node = args.get_node()
    comboBox.set_text(node.get_text());
 
    comboBox.trackChanges();
    comboBox.get_items().getItem(0).set_text(node.get_text());
    comboBox.get_items().getItem(0).set_value(node.get_value());
    comboBox.commitChanges();
 
    comboBox.hideDropDown();
    comboBox.attachDropDown();
 
    $('#btnSearch').click();
 
}
Sergi
Top achievements
Rank 1
 answered on 08 Jun 2012
11 answers
434 views
Hi
i'm using the radscheduler in order to create a schedule for ssrs and telerik reports. this will work together with my alerting engine.

currently my page allows the user to select their report and set the report parameters. thereafter they click on the radschedule to select their recurrence and save. This is where i need to add more buttons\ drop downs etc as i require more info on the scheduled report other than just the recurrence. i need to add the extra controls onto the radscheduler appointment popup.

much appreciated
Avesh
Peter
Telerik team
 answered on 08 Jun 2012
1 answer
58 views
Hi,

We are looking for third party asp.net controls and i am wondering if there is any controls available in telerik which can show related values inside the dropdown/combo box?

We want to show multiple related columns with header inside the combo box so when the user click on the table cell, it will show combo box data in multiple columns format and first columns value is related to second column and second column is related to third.

Country -> City -> Places

Also, is there any combobox control which can show values in tree format with check boxes?
Ivana
Telerik team
 answered on 08 Jun 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?