Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
263 views
We have a RadComboBox with EnableLoadOnDemand set to true which can potentially contain angle brackets and such. The RadComboBox shows this information with no difficulty even though it does not appear to be HtmlEncoded. When an event fires and the system does a postback, we get an HttpRequestValidationException. If I HtmlEncode the item text before I populate the combobox, I see the encoding rather than the encoded character. I.e., I see & rather than an ampersand. I realize I can globally disable request validation but that is far from an ideal solution. Where do I need to HtmlEncode the text so that it displays properly and does not throw an exception on submitting the page?
Simon
Telerik team
 answered on 16 Nov 2009
2 answers
177 views
I'd like to know if it's possible to use a RadCombobox within an XMLHttpPanel. 

My attempts thus far yield the following error:

"XMLHttpPanel Callback Loading error: 
  Exception=Script control 'cmbo2' is not a registered script control.  Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl"

My code looks like this:

<%@ Page Language="VB" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/DTD/xhtml11.dtd"> 
 
<script runat="server">  
    Protected Overrides Sub OnPreRender(ByVal e As EventArgs)  
        MyBase.OnPreRender(e)  
        ScriptManager1.RegisterScriptControl(Of RadComboBox)(cmbo2)  
    End Sub  
      
    Protected Sub XmlHttpPanel_ServiceRequest(ByVal sender As Object, ByVal e As RadXmlHttpPanelEventArgs)  
        Dim val As String = e.Value  
 
        'Simulate a longer process  
        System.Threading.Thread.Sleep(1000)  
 
        cmbo2.Items.Clear()  
        lbl1.Text = Now 
    End Sub  
      
</script> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
    <head id="Head1">  
        <title></title>  
          
        <script language="javascript" type="text/javascript">  
            function cmboChanged(sender, args) {  
                var panel = $find("<%=RadXmlHttpPanel1.ClientID%>");  
                panel.set_value("");  
            }  
        </script>                  
                  
    </head> 
    <body> 
    <form id="form1" method="post" runat="server">  
        <telerik:RadScriptManager runat="server" ID="ScriptManager1" /> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel> 
          
        <telerik:RadComboBox runat="server" ID="cmbo1" OnClientSelectedIndexChanged="cmboChanged" > 
            <Items> 
                <telerik:RadComboBoxItem Text="1" Value="1" /> 
                <telerik:RadComboBoxItem Text="2" Value="2" /> 
                <telerik:RadComboBoxItem Text="3" Value="3" /> 
                <telerik:RadComboBoxItem Text="4" Value="4" /> 
            </Items> 
        </telerik:RadComboBox> 
 
        <telerik:RadXmlHttpPanel   
            ID="RadXmlHttpPanel1" runat="server"   
            LoadingPanelID="RadAjaxLoadingPanel1" 
            OnServiceRequest="XmlHttpPanel_ServiceRequest">  
            <telerik:RadComboBox runat="server" ID="cmbo2" > 
                <Items> 
                    <telerik:RadComboBoxItem Text="1" Value="1" /> 
                    <telerik:RadComboBoxItem Text="2" Value="2" /> 
                    <telerik:RadComboBoxItem Text="3" Value="3" /> 
                    <telerik:RadComboBoxItem Text="4" Value="4" /> 
                </Items> 
            </telerik:RadComboBox>      
              
            <asp:Label runat="server" id="lbl1" /> 
                          
        </telerik:RadXmlHttpPanel> 
 
        </form> 
    </body> 
</html> 
 
 
Pero
Telerik team
 answered on 16 Nov 2009
1 answer
194 views
I'm not sure what is firing this event but in certain cases where you double click or single click the titlebar, the dock will tries to reposition itself again in the dockzone.
In certain extreme cases, it will move to another dockzone.
I would like to remove this behavior from the dock as my layout is fixed.
Thanks.
Pero
Telerik team
 answered on 16 Nov 2009
1 answer
124 views
I need to export a subset of documents from a grid.  Here is the flow:

1. User Clicks export
2. A popup window displays with date fields (To and From)
3. User populates fields and clicks "Go"
4. Only the rows within the user entered dates are exported
5.  The grid on the screen is unchanged

I don't want to filter the grid on the screen.  I would like to apply the filter only in the code behind while filtering. Is this possible?

Thanks.

- Adam L
Pavlina
Telerik team
 answered on 16 Nov 2009
1 answer
126 views
Hello,

i am currently looking for the option to remove single elements from the hyperlink dialog in the editor and hope that someone can give me a tipp. I am trying to remove the marked elements inside the screenshots i attachet

Thank you
Georgi Tunev
Telerik team
 answered on 16 Nov 2009
4 answers
190 views
Hello,

This test brings to light a problem to view all the data in the RadGrid. Grid contents 10 fields, but horizontal grid scrolling don't show all of them.
If I move the splitter bar, I can see more or less of the content, and i don't want Splitter interferes to display columns.
I'm using Q2 2009.

Thank you for help.

<%@ Register TagPrefix="Telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestSplitterWithGrid._Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
    <asp:ScriptManager ID="SC1" runat="server" /> 
 
    <telerik:RadSplitter id="RadSplitter_All" runat="server" Height="600" Width="800" orientation="Vertical" VisibleDuringInit="false">  
 
        <telerik:RadPane id="RadPane_Left" runat="server" Width="220" Scrolling="None">  
 
        </telerik:RadPane> 
 
        <telerik:RadSplitBar id="RadSplitbar_Vert" runat="server" CollapseMode="Forward" Width="22" /> 
          
        <telerik:RadPane id="RadPane_Right" runat="server" Width="100%" Scrolling="None">  
 
            <Telerik:RadGrid ID="RadGrid1" runat="server" Height="100%" Width="100%" 
                AutoGenerateColumns="False" GridLines="None" AllowPaging="False"   
                onneeddatasource="RadGrid1_NeedDataSource">  
                <mastertableview> 
                    <Columns> 
                        <Telerik:GridBoundColumn DataField="DataField0" HeaderText="Field0" /> 
                        <Telerik:GridBoundColumn DataField="DataField1" HeaderText="Field1" /> 
                        <Telerik:GridBoundColumn DataField="DataField2" HeaderText="Field2" /> 
                        <Telerik:GridBoundColumn DataField="DataField3" HeaderText="Field3" /> 
                        <Telerik:GridBoundColumn DataField="DataField4" HeaderText="Field4" /> 
                        <Telerik:GridBoundColumn DataField="DataField5" HeaderText="Field5" /> 
                        <Telerik:GridBoundColumn DataField="DataField6" HeaderText="Field6" /> 
                        <Telerik:GridBoundColumn DataField="DataField7" HeaderText="Field7" /> 
                        <Telerik:GridBoundColumn DataField="DataField8" HeaderText="Field8" /> 
                        <Telerik:GridBoundColumn DataField="DataField9" HeaderText="Field9" /> 
                    </Columns> 
                </mastertableview> 
                <HeaderStyle Width="100" /> 
                <clientsettings> 
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="3" /> 
                </clientsettings> 
            </Telerik:RadGrid> 
 
        </telerik:RadPane> 
 
    </telerik:RadSplitter> 
 
    </div> 
    </form> 
</body> 
</html> 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Data;  
 
namespace TestSplitterWithGrid  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
        }  
 
        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            //AllData[] AD = GetData();  
            //RadGrid1.MasterTableView.DataSource = AD;  
 
 
            DataTable table = new DataTable();  
            table.Columns.Add("DataField0", typeof(string));  
            table.Columns.Add("DataField1", typeof(string));  
            table.Columns.Add("DataField2", typeof(string));  
            table.Columns.Add("DataField3", typeof(string));  
            table.Columns.Add("DataField4", typeof(string));  
            table.Columns.Add("DataField5", typeof(string));  
            table.Columns.Add("DataField6", typeof(string));  
            table.Columns.Add("DataField7", typeof(string));  
            table.Columns.Add("DataField8", typeof(string));  
            table.Columns.Add("DataField9", typeof(string));  
 
            table.Rows.Add("A0", "A1", "A2", "A3", "A4", "A5", "A5", "A6", "A8", "A9");  
            table.Rows.Add("B0", "B1", "B2", "B3", "B4", "B5", "B5", "B6", "B8", "B9");  
            table.Rows.Add("C0", "C1", "C2", "C3", "C4", "C5", "C5", "C6", "C8", "C9");  
            table.Rows.Add("D0", "D1", "D2", "D3", "D4", "D5", "D5", "D6", "D8", "D9");  
            table.Rows.Add("E0", "E1", "E2", "E3", "E4", "E5", "E5", "E6", "E8", "E9");  
            table.Rows.Add("F0", "F1", "F2", "F3", "F4", "F5", "F5", "F6", "F8", "F9");  
            table.Rows.Add("G0", "G1", "G2", "G3", "G4", "G5", "G5", "G6", "G8", "G9");  
            table.Rows.Add("H0", "H1", "H2", "H3", "H4", "H5", "H5", "H6", "H8", "H9");  
            table.Rows.Add("I0", "I1", "I2", "I3", "I4", "I5", "I5", "I6", "I8", "I9");  
 
            RadGrid1.MasterTableView.DataSource = table;  
 
        }  
    }  
}  
 
Iana Tsolova
Telerik team
 answered on 16 Nov 2009
1 answer
65 views
Hi,

We have a web page with telerik grid. The control is paginated with 20 records per page. The user navigates between grid pages by using a prev and next button. When on say page # 6 the user clicks on a record in the grid and navigates to another web page.now he sees that this is not the record and wants to go back to page #6 of the grid.

How can we achieve this?

We are using ASP.NET AJAX Q1 2009.


Thanks

Kartik
Johny
Top achievements
Rank 1
 answered on 16 Nov 2009
1 answer
82 views
Hello
i am using Q3 2008 version of Rad Ajax controls..

When i show a RadWindow i shows up with the right/left borders in opposite directions.
We use RTL to use our language..
When it's set to LTR it works correctly..


Thank you,
Dror
Georgi Tunev
Telerik team
 answered on 16 Nov 2009
4 answers
277 views

      Hi,

                 In our project  many places we use RadControls. In that especially RadGrid is very frequent in use.
              For finding the RadGrid Selected row details( columns ) , we used to write like this as below
 
         This below radio button we placed in the ItemTemplate.

      <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
              <ItemTemplate>
                  <asp:RadioButton ID="rboAccount" runat="server" AutoPostBack="true" GroupName="myGroup"
                                                                            OnCheckedChanged="ToggleSelectedState" />
               </ItemTemplate>
      </telerik:GridTemplateColumn>

       foreach (GridDataItem item in rgSearchResults.MasterTableView.Items)
        {
            RadioButton radio = (RadioButton)item.FindControl("rboAccount");
            if (radio.Checked == true)
            {
                objCustomerContext.CustomerID = Convert.ToInt32(item.Cells[3].Text);
            }
        }

                       This works fine, but if maore records in the Grid, for finding the selected row details , it is taking more time. There is a      lot of performance issue.

         Can you please help me in this regard with a better performance oriented solution to find the values in the particular row.

 Thank you,
  Gupta
gupta gf
Top achievements
Rank 1
 answered on 16 Nov 2009
1 answer
121 views
[This is after upgrading from RadControls AJAX Q3 2008 to Q1 2009, where all of this was working correctly before].

In our website, we have a page that has a RadGrid with a template column, which contains a RadComboBox. A requirement is that when the user presses [enter] in a combobox, it pre-selects a default item and moves focus onto the equivalent combobox in the next row.
This is all done on the RadComboBoxes' "ClientKeyPressing" client-side event in javascript.

All of this is working OK, up until we try to set focus onto the next RadComboBox. I'm currently using the control's "selectText()" function, (no arguments), as that's what we used before. However, it doesn't move the focus in I.E. at all, but sort of does in Firefox and Safari, (the three browsers we're supporting), in that the next RadComboBox is highlighted but it won't accept inputs.
What javascript do we need to achieve this?

The other thing that's going wrong is, based on another requirement, we have a DefaultButton set for the RadGrid, (as it's contained in a standard Panel), but we can't find a way to prevent this button from being called any more. It isn't raised in I.E., but both Firefox and Safari still cause it to be fired.
We were simply returning "false" from the event handler, so what should we change it to now?

Thanks for any help
Paul
Yana
Telerik team
 answered on 16 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?