Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
92 views
First I'll post the code.
Here's the javascript code:

     function sortByStatus() {
 
//             var item = eventArgs.get_item();
             //             var strSort = item.get_value();
             var combo = $find("<%= rcbStatus.ClientID %>");
             var comboItem = combo.get_selectedItem();
             var strSort = comboItem.get_value();
             alert('Selected ' + comboItem.get_value());
 
             if (strSort != 'Active') {
                 window.location = 'meet-the-panel.aspx?paneltype=' + strSort;
             } else {
                 window.location = 'meet-the-panel.aspx';
             }
             
     }


<telerik:RadComboBox ID="rcbStatus" runat="server" Skin="Black" EnableEmbeddedSkins="false" Width="220px" >
                <Items>
                    <telerik:RadComboBoxItem Value="Active" Text="Current Panelists"/>
                    <telerik:RadComboBoxItem Value="alumni" Text="Past Panelists"/>                   
                </Items>
</telerik:RadComboBox>

What this is supposed to do is that when an element is selected run the javascript and go to that page. It works for a few times and then my browser errors with this 'SCRIPT445: Object doesn't support this action' and highlights this line: var a=g?new h(g):new h. At first I thought that the function was not mapping to the combobox and setting the onclientselectedindexchanged on the server side and that did nothing.  I tried setting the autopostback to true and tried it from serverside but I instantly got the same error after one selection. Then I thought that it's not grabbing the value from the box, but from the alert it looked like it was working. The only thing left was the windows.location so I commented that out and I don't receive that error anymore. Something is happening with the redirections that is causing this and I have no idea what it could be. I dont know if this helps but we are using custom skins for this combobox.
Princy
Top achievements
Rank 2
 answered on 06 Nov 2012
1 answer
183 views
Hi need a point in the right direction for an example that will help me do what I need.

I have a radcombobox that is multiselect, using templates.  When I select an item, I need to go through and either a) select other items or b) highlight other items with a changed back color. 

Any direction welcome!

What i was doing prior, was the following on selectedindexchanged on a listbox:
Protected Sub ChangeBackColorIfImplied()
      Dim SelectedNum As Integer = -1
      Dim SelectedString As String = ""
      Dim StringofUps As String = ""
      lblUpInfo.Text = ""
      Dim i As Integer
      For i = 1 To lbUp.Items.Count - 1
          If lbUp.Items(i).Selected Then
              StringofUps = StringofUps & lbUp.Items(i).Value
              lbUp.Items(i).Attributes.Add("style", "background-color#FFFFFF")
          End If
      Next i
      Dim Flag As Boolean = False
      Dim mylistitem As ListItem
      For Each mylistitem In lbUp.Items
          Dim ListItemString As String = mylistitem.Value
          If InStr(StringofUps, ListItemString) > 0 Then
              If StringofUps <> ListItemString Then
                  mylistitem.Attributes.Add("style", "background-color:#99FFFF")
                  lblUpInfo.Text = "All entities and people highlighted in light blue will also receive this communication"
              End If
          Else
              mylistitem.Attributes.Add("style", "background-color:#FFFFFF")
          End If
      Next
  End Sub
Princy
Top achievements
Rank 2
 answered on 06 Nov 2012
6 answers
3.3K+ views
Can some one help me with changing font name to Arial and size  to 8pt across a Radgrid control but using Web20 skin?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 06 Nov 2012
1 answer
63 views
Hi,

In my RadGrid, I've enabled filtering of columns. I need to clear the filter on inserting a new row. How can I do that?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 06 Nov 2012
1 answer
42 views
Hi all,

Could you please provide some suggestions to give color for the CommandItem? 

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 06 Nov 2012
4 answers
144 views
Hi,

I have face an issue on the telerik radeditor whereby the table lines will go missing when i copy and paste the content from a msword document to the telerik radeditor after i save it and redisplay it.

The initialContent.jpg is the screenshot when i copy and paste the content. it looks ok and den i save the content of the radeditor into a database.

After which, when i load the contents back to the radEditor, the table lines had gone missing. Please refer to outcomecontent.jpg.

What might be the cause? is there any possible workaround?

Regards
Eugene Wong
Top achievements
Rank 1
 answered on 06 Nov 2012
1 answer
42 views
Add New Record Creates Text Boxes For All Columns in my Grid, I just want one.  It's a very simple page to populate a drop down list.
There are 2 columns, the table ID Attach_Type_ID (INT) and the DDL value Name.

 

 

 

<Columns>
  
<telerik:GridBoundColumn DataField="Attach_Type_ID" 
  
HeaderText="Attach_Type_ID" 
  
visible="False">
  
</telerik:GridBoundColumn>
  
<telerik:GridBoundColumn DataField="Name" MaxLength="50" 
  
FilterControlAltText="Filter Name column" HeaderText="Attachment Type" 
  
UniqueName="Name">
  
<HeaderStyle Width="72px"/> 
  
</telerik:GridBoundColumn>
  
<telerik:GridButtonColumn ConfirmText="Delete?" ConfirmDialogType="RadWindow" 
  
ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
  
</Columns>
For Add New Record, I just want to see Name.  I will do an insert and SQL will generate a new ID.
What I get is two textboxes, one for
"Attach_Type_ID" and one for "Name".
Hwo do I get rid tjhe one for "Attach_Type_ID" ?
Here's all the .ASPX:

 

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Login.Master" CodeBehind="AdminAttachmentType.aspx.vb" Inherits="ConEdison.PTAR.AdminAttachmentType" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <style type="text/css">
            .orderText
            {
                font: normal 12px Arial,Verdana;
                margin-top: 6px;
            }
        </style>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHeader" runat="server">
<b>
Attachment Type Administration
</b>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script src="scripts/admin.js" type="text/javascript"></script>
        </telerik:RadCodeBlock>
          
    <telerik:RadAjaxManager ID="Attach_TypeAjaxManager" runat="server" OnAjaxRequest="Attach_TypeAjaxManager_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Attach_TypeAjaxManager">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Attach_TypeRadGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Attach_TypeRadGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Attach_TypeRadGrid" />
                         <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                        <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>             
          
<telerik:RadGrid OnItemCreated="Attach_TypeRadGrid_ItemCreated" ID="Attach_TypeRadGrid" runat="server"
        AllowPaging="False"  AllowAutomaticDeletes="True"
         CellSpacing="0"  ShowGroupPanel="False"  
        PageSize="50" Skin="Web20" >
          
        <FilterMenu EnableImageSprites="False"></FilterMenu>
  
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="False"   
            ReorderColumnsOnClient="True">    
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="False" UseStaticHeaders="True" />
        </ClientSettings>
  
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Name" ClientDataKeyNames="Name" Width="100%" CommandItemDisplay="Top">
<CommandItemSettings ExportToPdfText="Export to PDF"  ShowRefreshButton="True"></CommandItemSettings>
  
<RowIndicatorColumn Visible="True" SortedBackColor="lightblue" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
          <telerik:GridBoundColumn DataField="Attach_Type_ID"   
            HeaderText="Attach_Type_ID"  
             visible="False">
           </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="Name" MaxLength="50" 
            FilterControlAltText="Filter Name column" HeaderText="Attachment Type" 
            UniqueName="Name">
            <HeaderStyle Width="72px"/>    
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ConfirmText="Delete?" ConfirmDialogType="RadWindow"   
                     ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
    </Columns>
</MasterTableView>
</telerik:RadGrid>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
  
  <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">       </telerik:TextBoxSetting>
 </telerik:RadInputManager>
</asp:Content>
    <asp:Content ID="Content5" ContentPlaceHolderID="ContentScriptHolder" runat="server">
</asp:Content>

 

 


 

David
Top achievements
Rank 1
 answered on 05 Nov 2012
2 answers
61 views
Hi,

We are using this version: RadControls for ASP.NET AJAX 2012.1.411.

Character Count is working in IE9, IE10, Chrome and Firefox.

It is not working for IE8 and IE9.

Do you have any workarounds? The version we have is the latest we can get at this point.

Thanks!
Swati
Top achievements
Rank 1
 answered on 05 Nov 2012
2 answers
80 views
I'm not sure where to begin with this one.

I have a RadGrid with a bound text field that is 2000 char long in the DB.  The user can go into the popup and edit it with the RadEditor (and basically do anything he or she wants with color and size.)

What I'd like to be able to do is perhaps display only the first 20-30 characters of the field in the grid in a fixed length column with no wrap and fixed font size (and no colors.)

Is it possible to do this in the properties or do I need to use CSS?

What I don't want is what I've put in the picture.

How do I do this?
Boris
Top achievements
Rank 1
 answered on 05 Nov 2012
2 answers
74 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?