Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
61 views
I have this code to allow users to enter dates into a RadDateInput using the formats mdyy or mddyy, reformatting them as mm/dd/yyyy.  It works great for Firefox and IE8, but it does not work for IE7.  I walked through the code, and set_newValue is in fact fired, but it does not change the date, and it handles those formats as invalid.

I also tried hacking it by setting the textbox and hidden fields directly, but that failed in pretty short order.

Has anyone implemented set_newValue in IE7?

<script type="text/javascript">
    function PreParseDate(sender, eventArgs)
    {
        var reSpace = /\s*/g;
        var reMdyy = /^\d{4}$/;
        var reMddyy = /^\d{5}$/;
        var val = eventArgs.get_newValue().replace(reSpace, '');
        
        if (reMdyy.test(val))
        {           
            eventArgs.set_newValue('0' + val[0] +
      '/0' + val[1] +
      '/' + (val[2] > 1 ? '19' : '20') + val[2] + val[3]);
        }
        else if (reMddyy.test(val))
        {
            eventArgs.set_newValue('0' + val[0] +
      '/' + val[1] + val[2] +
      '/' + (val[3] > 1 ? '19' : '20') + val[3] + val[4]);
        }
    }
</script>
<telerik:RadDateInput ID="rdiDOB" runat="server">
    <ClientEvents OnValueChanging="PreParseDate" />
</telerik:RadDateInput>

Thank you,

Eric
Eric
Top achievements
Rank 1
 answered on 02 May 2011
5 answers
371 views
Hi, I have RadDecorator on my page but I want to exclude only couple of TextBoxes and couple of Labels where I want to apply my own CSS.

 

<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"

 

 

Skin="WebBlue"></telerik:RadFormDecorator>

 


Now, I already applied CSSClass to my textbox but its not applying as I have formDecorator on my page as above.
So How do I exclude specific controls from FormDecorator to apply my own CSS?

Thanks in advance

Emanuele
Top achievements
Rank 2
 answered on 02 May 2011
1 answer
74 views
Hi,
I have a combobox that shows data in columns which are template column with Link buttons. It also has a linkbutton in header.
Linkbutton in header needs to be made visible when the user types in some text.
The combobox shows "Recently viewed records" and when the user types in some text i rebind the combobox with a master data
which is a different collection from the recently viewed items so i clear out the prevoius items and bind matching records from the
typed text from the master recordset.
Each of my record has a menu that has dynamic data as per the record based on a relationship.
When i rebind the data when user types a text i get an error saying "Script control &#39;menuClients&#39; is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().Parameter name: scriptControl"
also am not able to make the linkbutton in header visible when user types the radcombo textbox.
One of the fixes I found was to make “RegisterWithScriptManager = ‘false’” but then the menu’s clientside events are lost (as in it doesn’t show the menu item list on hover).
Would really appreciate a response.

Thanks,
Sudhir.
Kalina
Telerik team
 answered on 02 May 2011
2 answers
47 views
Hi,
i have a code in page_load like that

Dim scriptstring As String = "radalert('test', 300, 125, 'header test');"
RadAjaxPanel1.ResponseScripts.Add(scriptstring)



it works with IE8 and IE7, but not work with IE9. How can i fix this.

Thanks


Mehmet Tirgil
Top achievements
Rank 1
 answered on 02 May 2011
3 answers
228 views
Hello,

  I am on Q2 2010 SP2, How can i improve the performance of my RadGrid, it has just 75 rows but it takes close to 7 seconds when i navigate between pages each of size 25, Is there a way to improve this latency? I am using filtering and sorting. Here is a sample of my grid declaration.

Lot of the help i got from previous posts don't work for filtering and sorting option. Any help is greatly appreciated.

Thanks,
Kavitha
<telerik:radgrid id="RadGrid1" width="100%" allowfilteringbycolumn="true" showstatusbar="true"
           allowsorting="True" allowpaging="True" pagesize="100" runat="server" autogeneratecolumns="False"
           enablelinqexpressions="false" onitemcommand="RadGrid1_ItemCommand" onneeddatasource="RadGrid1_NeedDataSource"
           allowmultirowselection="true" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">
           <PagerStyle Mode="NextPrevAndNumeric" Position="Top" AlwaysVisible="true" />
           <mastertableview datakeynames="WorkOrderID" clientdatakeynames="WorkOrderID">
           <CommandItemSettings ShowAddNewRecordButton="false" />
               <Columns>
                   <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="50px">
                   </telerik:GridClientSelectColumn>
                   <telerik:GridBoundColumn UniqueName="WorkOrderID" DataField="WorkOrderID" HeaderText="Work Order ID">
                       <FilterTemplate>
                           Clear filters
                           <asp:ImageButton ID="btnShowAll" runat="server" ImageUrl="~/Img/filterCancel.gif"
                               AlternateText="Show All" ToolTip="Show All" OnClick="btnShowAll_Click" Style="vertical-align: middle" />
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="DateAdded" DataField="DateAdded" HeaderText="Date Added"
                       DataFormatString="{0:d}" HeaderStyle-Width="90px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboDateAdded" DataTextField="DateAdded" DataValueField="DateAdded"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DateAdded").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="DateAddedIndexChanged" OnLoad="RadComboBoxDateAdded_OnLoad">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock5" runat="server">
                               <script type="text/javascript">
                                   function DateAddedIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("DateAdded", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="DateUpdated" DataField="DateUpdated" HeaderText="Updated Date"
                       DataFormatString="{0:d}" HeaderStyle-Width="90px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboDateUpdated" DataTextField="DateUpdated" DataValueField="DateUpdated"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DateUpdated").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="DateUpdatedIndexChanged" OnLoad="RadComboBoxDateUpdated_OnLoad" OnItemDataBound="RadComboDateUpdated_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock6" runat="server">
                               <script type="text/javascript">
                                   function DateUpdatedIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("DateUpdated", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Status" DataField="Status" HeaderText="Status"
                       HeaderStyle-Width="200px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxStatus" DataTextField="Status" DataValueField="Status"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="StatusIndexChanged" OnLoad="RadComboBoxStatus_OnLoad" OnItemDataBound="RadComboStatus_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                               <script type="text/javascript">
                                   function StatusIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("Status", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Category" DataField="Category" HeaderText="Category"
                       HeaderStyle-Width="200px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxCategory" DataTextField="Category" DataValueField="Category"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Category").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="CategoryIndexChanged" OnLoad="RadComboBoxCategory_Onload" OnItemDataBound="RadComboCategory_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
                               <script type="text/javascript">
                                   function CategoryIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("Category", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Addr1" DataField="Addr1" HeaderText="Street Address"
                       HeaderStyle-Width="100px" AllowFiltering="false">                   
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="City" DataField="City" HeaderText="City"
                       HeaderStyle-Width="100px" AllowFiltering="false">                        
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="State" DataField="State" HeaderText="State"
                       HeaderStyle-Width="100px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxState" DataTextField="State" DataValueField="State"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("State").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="StateIndexChanged" OnLoad="RadComboBoxState_OnLoad" Width="50px" OnItemDataBound="RadComboState_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock9" runat="server">
                               <script type="text/javascript">
                                   function StateIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("State", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
               </Columns>
           </mastertableview>
           <clientsettings enablerowhoverstyle="true">
               <Selecting AllowRowSelect="True" />
               <ClientEvents OnRowSelected="RadGrid1_RowSelected" OnRowDeselected="RadGrid1_RowDeselected" OnGridCreated="GridCreated" />
           </clientsettings>
       </telerik:radgrid>
Pavlina
Telerik team
 answered on 02 May 2011
1 answer
65 views
Hi,

I need a row in the radgrid to be kept highlighted after the user navigate back to the original page using the pager. By default, if user navigates to a new page after selecting a row, the row will not be highlighted any more after navigating back to the original page. I thought session state might be a way for me to do this, but I failed to do so.

 I am new to telerik and not very familiar with rad controls. Could anyone please help me on how to do this?  Thanks a lot.

Meng
Pavlina
Telerik team
 answered on 02 May 2011
2 answers
80 views
My rad conrol grid is working fine, but one of the user is asking me to put a label right next to the paging icons, the front and previuos icons. Is their any way I can access that area. I need to put a label there that says something about the data that is present in the grid.I could have displayed it in the footer, but he really wants to see the label right next to the navigation buttons.

Any help will be greatly appreciated.
Anjali
Top achievements
Rank 1
 answered on 02 May 2011
9 answers
220 views
Hi everyone,

Please, some light with my problem...

I have a RadGrid (principal) with NestedViewTemplate, in this NestedView I have one RadChar and one RadGrid (slave).

The problem is that when I select one item on main RadGrid (principal) and is showed the RadChart and the RadGrid (slave), the values of RadChart and RadGrid (slave) don´t change anymore. 

I believe that exists a command to force update controls into NestedView, considering the parameters from main RadGrid (principal).

Thanks, best

Daniel
Daniel Aquere
Top achievements
Rank 2
 answered on 02 May 2011
4 answers
60 views
When the Content property of the RadEditor is read during development it uses the url as localhost.  At runtime when the value is set in production it will of course need to to use the domain name. 

Anyone have an example of handling this efficiently?  I can of course use an HTMLHelper to parse the value and do a search and replace, just curious if there are any other putfals in this topic.

Thanks,
Reid
Reid
Top achievements
Rank 2
 answered on 02 May 2011
3 answers
50 views
This something the RadButton has that I'd like to see in the Toolbar as well

I don't want each toolbar button to have it's own "ImageURL" so I get more resources downloaded.

Instead what I'd like is the ability to say

ImagePosition="Right" ImageCss="PrevButton"

So the image element for that button would be inserted left or right (depending on the Position set), but have the CssClass applied instead of an image so the css allows me to use a background image sprite.

I know I can probably skirt it by setting CSS to be like "Prev_right" and "Prev_left" but I'd like to make this easier for my devs...the RadButton handles it very elegantly.

PLEASE :)
Simon
Telerik team
 answered on 02 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?