Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
116 views
Good afternoon,

I'm working on increasing the speed of a dynamically generated data entry page.  The page contains between 1 and 7 RadGrids, each with 20 or so rows, each row containing at least one RadNumericTextbox for data entry.  So, maybe 140 RadNumericTextboxes, as well as a handful of other controls such as RadComboBoxes and a couple RadWindows.

I'm trying to reduce the page size which right now stands at about 3.5MB.  There is a VERY large block of Javascript at the bottom of the page containing the code to instantiate all the RadControls.  Hundreds of lines of Telerik code that all look something like this:
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadNumericTextBox, {"_displayText":"","_focused":false,"_initialValueAsText":"","_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027entry20121022$rgSalesEntry$ctl00$ctl25$rwinNewSupplemental$C$rgSupplemental$ctl00$ctl36$txtSupplementalValue\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"Default","_validationText":"","clientStateFieldID":"entry20121022_rgSalesEntry_ctl00_ctl25_rwinNewSupplemental_C_rgSupplemental_ctl00_ctl36_txtSupplementalValue_ClientState","enabled":true,"incrementSettings":{InterceptArrowKeys:true,InterceptMouseWheel:true,Step:1},"numberFormat":{"DecimalDigits":2,"DecimalSeparator":".","CultureNativeDecimalSeparator":".","GroupSeparator":",","GroupSizes":3,"NegativePattern":"-n","NegativeSign":"-","PositivePattern":"n","AllowRounding":true,"KeepNotRoundedValue":false,"KeepTrailingZerosOnFocus":true,"NumericPlaceHolder":"n"},"styles":{HoveredStyle: ["width:70px;text-align:right;", "riTextBox riHover"],InvalidStyle: ["width:70px;text-align:right;", "riTextBox riError"],DisabledStyle: ["width:70px;text-align:right;", "riTextBox riDisabled"],FocusedStyle: ["width:70px;text-align:right;", "riTextBox riFocused"],EmptyMessageStyle: ["width:70px;text-align:right;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:70px;text-align:right;", "riTextBox riRead"],EnabledStyle: ["width:70px;text-align:right;", "riTextBox riEnabled"],NegativeStyle: ["width:70px;text-align:right;", "riTextBox riNegative"]}}, {"valueChanged":txtValue_ValueChangedentry20121022}, null, $get("entry20121022_rgSalesEntry_ctl00_ctl25_rwinNewSupplemental_C_rgSupplemental_ctl00_ctl36_txtSupplementalValue"));
});

Is there any way to reduce or eliminate the size of this generated code at the bottom of the page?  I copied-and-pasted it out into a separate file and it's nearly half (1.6MB total) of my 3.5MB page size.

Aaron Gibbs
Top achievements
Rank 2
 answered on 05 Nov 2012
2 answers
107 views
I am using  version Telerik "v 2012.3.101645".

And have the following problem as the attachment. 

When I delete FormDecorator page, works normally.

Only Internet Explorer 8


<telerik:RadDatePicker ID="dtAgendamento" runat="server" ZIndex="30001"
                                            ShowPopupOnFocus="True" Skin="Vista"
                                            AutoPostBack="True"  Visible="False" Width="120px" TabIndex="2">
                                 
                         <Calendar Skin="Vista" UseColumnHeadersAsSelectors="False"
                                   UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                         </Calendar>
                         <DateInput DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy" LabelWidth="" TabIndex="2"
                                    >
                         </DateInput>
                       
                     </telerik:RadDatePicker>



Robson
Top achievements
Rank 2
 answered on 05 Nov 2012
1 answer
131 views
Hi -

I'm using grouping by dragging them to the group region, which works fine.  However, the group headers in the  grid are displaying with dark grid lines going through them.  I have tried the following code to turn off displaying of them but to no effect:

<GroupPanel SkinID="Office2007">
    <PanelItemsStyle GridLines="None" />
    <PanelStyle GridLines="None"
</GroupPanel>

I also tried setting the style as follows, but couldn't effect the grid lines:

GroupHeaderItemStyle-BackColor="White"

I have included the code for my (growingly-complicated) grid and an image of what I'm seeing for good measure.  Please let me know if you have any suggestions.

Thank you

<telerik:RadGrid ID="DetailsGrid" runat="server" CellSpacing="0" Skin="Office2007" GridLines="Vertical" AllowSorting="true" ShowGroupPanel="true" AllowPaging="false" OnNeedDataSource="DetailsGrid_NeedDataSource" OnUpdateCommand="DetailsGrid_UpdateCommand" OnItemDataBound="DetailsGrid_ItemDataBound"
OnItemCreated="DetailsGrid_ItemCreated" OnDataBound="DetailsGrid_DataBound" OnDataBinding="DetailsGrid_DataBinding" GroupHeaderItemStyle-BackColor="White">
    <SelectedItemStyle CssClass="selectedRow" />
    <ClientSettings ReorderColumnsOnClient="true" EnablePostBackOnRowClick="false" AllowDragToGroup="true">
        <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ShowRowIndicatorColumn="true" AllowResizeToFit="true" />
        <ClientEvents OnGridCreated="GridCreated" OnKeyPress="KeyPress" OnRowDblClick="RowDblClick" OnCommand="GridCommand" />                               
        <Selecting AllowRowSelect="true" CellSelectionMode="SingleCell" />
        <Scrolling UseStaticHeaders="true" AllowScroll="true" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" EditMode="InPlace" AutoGenerateColumns="false" DataKeyNames="opportunityProductId" ShowFooter="true">
        <HeaderStyle HorizontalAlign="Center" Width="135px" Font-Bold="true" />
        <Columns>
        ...
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
Pavlina
Telerik team
 answered on 05 Nov 2012
1 answer
111 views
I got a problem with a PopUp (radwindow)
there a radgrid in the parent (main), in the radgrid there a imagebutton than open de popup.
in the popup. in the popup I modifi the data that it's displayed in the radgrid.
So I tried to do to refresh only de radgrid, but it refresh all page and de radgrid show no records
this happend when I close de popup, I'm using this in the button in popup


ScriptManager.RegisterStartupScript(this, typeof(Page), "CloseAndRebind", "", true);

I want to do this, but using Datasource , without SqlDataSource

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window


greetings !
Angel Petrov
Telerik team
 answered on 05 Nov 2012
4 answers
112 views
Version: AJAX 2012 Q2 912
Browser: FF 15.0.1

Using the DBContentProvider to store the files on a MSSQL server.
When I'm downloading the file it cuts the name up to the first white space.

For example:

Jenny Baxter PDP #4.pdf  -->  Jenny.pdf
Ricardo
Top achievements
Rank 2
 answered on 05 Nov 2012
3 answers
97 views
I use cookie to save TheEditor's content, but when I load the cookie,visual studio will break at Request.Cookie and show the error message "Detected a potentially dangerous Request.Cookies value from the client, please reference http://go.microsoft.com/fwlink/?LinkID=212874"
Does someone know how to solve this problem?
Protected Sub ButtonSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSave.Click
    Response.Cookies("myText").Value = theEditor.Content
End Sub
  
Protected Sub ButtonLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonLoad.Click
    theEditor.Content = Request.Cookies("myText").Value
End Sub

Dobromir
Telerik team
 answered on 05 Nov 2012
2 answers
208 views
I have a Combox with a list of cities, if a client's city is missing I want them to be able to update the list on the fly.  Everything is working except one aspect.  In AddNewCityTextbox_TextChanged I simply find the textbox and add the Text to the CommandArgument of the radButton which is used to submit.

This all works, Except that the TextChanged only does a Postback when the Client clicks elsewhere.  In my case they wil logically click on Submit, therefore the JavaScript fires before (or seems to) the script is updated.

Is there another wau I can logically get around this?
Public Sub AddNewCityTextbox_TextChanged(sender As Object, e As System.EventArgs)
 
        Dim TextBox = CType(sender, RadTextBox)
        Dim item = CType(TextBox.NamingContainer, RadListViewEditableItem)
 
        Dim AddNewCityTextbox As RadTextBox = DirectCast(item.FindControl("AddNewCityTextbox"), RadTextBox)
 
        Dim SubmitLink As RadButton = DirectCast(item.FindControl("SubmitNewCity"), RadButton)
        SubmitLink.CommandArgument = "Please confirm you wish to add " & AddNewCityTextbox.Text & "?"
 
 
    End Sub
 
<telerik:RadButton ID="SubmitNewCity" runat="server" Text="Submit" style="margin-right:10px;" ValidationGroup="AddCityGroup"
                OnClientClicking="function(button,args){args.set_cancel(!window.confirm(button.get_commandArgument()));}"  >
</telerik:RadButton>
Tim
Top achievements
Rank 1
 answered on 05 Nov 2012
10 answers
362 views
After some action (ComboBoxSelectedItemChange) it throws the Console Error: Source and destination listbox can't be the same.

 I try to fix and understand the problem, but I can't. Please, help as fast as possible!
 
Here is my used telerik components and their properties:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadListBoxADGroups">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadListBoxGroups" />
                   <telerik:AjaxUpdatedControl ControlID="LabelMessage" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="RadListBoxGroups">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="LabelMessage" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="RadComboBoxPolice">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadListBoxGroups" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
  </telerik:RadAjaxManager>
          <table>
          <tr>
              <td>
                 <telerik:RadListBox ID="RadListBoxADGroups" runat="server" AllowTransfer="True" DataSourceID="ObjectDataSourceADGroup"
                      DataTextField="Name" Height="300px" Width="300px" TransferToID="RadListBoxGroups"
                      EmptyMessage="Active Directory is missing" AutoPostBackOnTransfer="True" OnTransferred="RadListBoxADGroupsTransferred"
                      EnableDragAndDrop="True" TransferMode="Copy">
                      <ButtonSettings TransferButtons="TransferFrom" Position="Right" VerticalAlign="Top"
                          AreaWidth="40" />
                  </telerik:RadListBox>
                  <asp:ObjectDataSource ID="ObjectDataSourceADGroup" runat="server" SelectMethod="SelectADGroups"
                      TypeName="Scheduler.WebClient.ADGroup"></asp:ObjectDataSource>
              </td>
              <td>
               <telerik:RadListBox ID="RadListBoxGroups" runat="server" EmptyMessage="No Sorted Groups"
                      Style="top: 0px; left: 0px; width: 250px; height: 300px" Height="300px" AutoPostBackOnDelete="True"
                      DataKeyField="GroupPoliceId" DataSourceID="ObjectDataSourceFiltGroups" DataTextField="Name"
                      DataValueField="Id" OnDeleted="RadListBoxGroupsDeleted" AllowDelete="True" OnClientDeleting="RadListBoxGroups_Deleting">
                      <ButtonSettings Position="Right" VerticalAlign="Top" AreaWidth="40" />
                  </telerik:RadListBox>
                  <asp:ObjectDataSource ID="ObjectDataSourceFiltGroups" runat="server" SelectMethod="SelectFilteredGroups"
                      TypeName="Scheduler.WebClient.Controller">
                      <SelectParameters>
                          <asp:ControlParameter ControlID="RadComboBoxPolice" Name="politicId" PropertyName="SelectedValue"
                              Type="Int32" />
                          <asp:ControlParameter ControlID="LabelOwnGName" Name="ownGName" PropertyName="Text"
                              Type="String" />
                      </SelectParameters>
                  </asp:ObjectDataSource>
              </td>
          </tr>
          <tr>
              <td>
                  <asp:Label ID="LabelOwnGName" runat="server" />
                  <asp:ObjectDataSource ID="ObjectDataSourceGrPolices" runat="server" SelectMethod="SelectGroupPolices"
                      TypeName="Scheduler.WebClient.Controller"></asp:ObjectDataSource>
              </td>
              <td>
                 <telerik:RadComboBox ID="RadComboBoxPolice" runat="server" DataSourceID="ObjectDataSourceGrPolices"
                      DataTextField="Name" DataValueField="Id" AutoPostBack="True" Width="100px">
                  </telerik:RadComboBox>
              </td>
          </tr>
      </table>
      </div>
  <br />
  <div class="field-center-error">
      <asp:Label ID="LabelMessage" runat="server" ClientIDMode="Static" />
  </div>

It's my RadListBox methods:
protected void RadListBoxADGroupsTransferred(object sender, Telerik.Web.UI.RadListBoxTransferredEventArgs e)
{
   if (e.DestinationListBox != sender)
    {
    foreach (var grpIns in  e.Items.Select(item => new Group { Name = item.Text,
GroupPoliceId = Convert.ToInt32(RadComboBoxPolice.SelectedValue) }) )
        {
          _sc.InsertGroup(grpIns);
        }
        LabelMessage.Text = Controller.Message;
        RadListBoxGroups.DataBind();
    }
}
protected void RadListBoxGroupsDeleted(object sender, Telerik.Web.UI.RadListBoxEventArgs e)
{
  foreach (var grpDel in e.Items.Select(item => new Group { Id = Convert.ToInt32(item.Value),
Name = item.Text }))
    {
      _sc.DeleteGroup(grpDel);
    }
    LabelMessage.Text = Controller.Message;
    RadListBoxGroups.DataBind();
}
Anatoliy
Top achievements
Rank 2
 answered on 05 Nov 2012
1 answer
109 views
I have created a treeview that binds to an xml data source (I followed the instructions on the following page: http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/xmlfile/defaultcs.aspx). If the 'ExpandMode' property in the data bindings is not set then the data is displayed by the treeview as expected - however, the server postback doesn't work correctly when you click on a node. If you set the ExpandMode property to 'ServerSide' the treeview does not populate correctly.

What am I doing wrong?

        <telerik:RadTreeView ID="XmlRadTreeView" runat="server"
            DataSourceID="TreeViewDataSource"
            DataFieldID="Text"
            DataFieldParentID="Text"
            PersistLoadOnDemandNodes="true"
            Width="550px"
            Height="350px"
            BorderStyle="Solid"
            BorderWidth="1px"
            Font-Size="14px"
            Font-Names="Bookman Old Style"
            BackColor="White"
            EnableViewState="true"
            OnNodeCollapse="XmlRadTreeView_NodeCollapse"
            OnNodeExpand="XmlRadTreeView_NodeExpand"
            OnNodeClick="XmlRadTreeView_NodeClick">
            <DataBindings>
                <telerik:RadTreeNodeBinding DataMember="Node" PostBack="true" ValueField="ID" TextField="Text" ImageUrlField="ImageUrl" ExpandedField="Expanded" ExpandMode="ServerSide"></telerik:RadTreeNodeBinding>
            </DataBindings>
            <NodeTemplate>
                <div class="CustomClass">
                    <%# DataBinder.Eval(Container, "Text") %>
                </div>
            </NodeTemplate>
        </telerik:RadTreeView>
Boyan Dimitrov
Telerik team
 answered on 05 Nov 2012
3 answers
99 views
So I have a custom attribute "typeFilter" on my scheduler object.  I have a tabpanel and when a different tab is selected, the customattribute in the scheduler changes and then I call rebind().  However, in my webservice getAppointments() function, the scheduler.attributes list is always 0.  Do I have to do something else to make sure the call to the webservice has the attributes filled in?

Thank you
Loren
Boyan Dimitrov
Telerik team
 answered on 05 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?