Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
246 views
Hi.

In some cases using IE11, if NumberFormat / GroupSeparator is present, it counts in the MaxValue validation.
For example:
If MaxValue is set to 11 and GroupSeparator to ".", and you type 99999999999 (11 characters) --> 99.999.999.999 (14 characters)
It's marked as invalid.
In Chrome it's fine.

Can you please check it.
Best regards.
Kostadin
Telerik team
 answered on 03 Jun 2015
2 answers
240 views

Hi,

I have a grid declared as follows:

    <telerik:RadGrid ID="grdTimeSheets" runat="server">
        <MasterTableView>
            <Columns>
                <telerik:GridButtonColumn ButtonType="PushButton" CommandName="Update" FilterControlAltText="Filter colButtonUpdate column" Text="Update" UniqueName="grdTimeSheetscolEditRecordButton" />
                <telerik:GridButtonColumn ButtonType="PushButton" CommandName="Delete" FilterControlAltText="Filter colButtonDelete column" Text="Delete" UniqueName="grdTimeSheetscolDeleteRecordButton" />
                <telerik:GridBoundColumn DataField="UserName" FilterControlAltText="Filter By User Name" UniqueName="colUserName" HeaderText="User Name" CurrentFilterFunction="Contains">
                    <ItemStyle HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn HeaderText="Clocked In" CurrentFilterFunction="GreaterThanOrEqualTo" DataField="ClockedInAt" DataType="System.DateTime" EditDataFormatString="dd-MMM-yyyy HH:mm" FilterControlAltText="Filter column column" FilterDateFormat="dd-MMM-yyyy HH:mm" PickerType="DateTimePicker" DataFormatString="{0:dd-MMM-yyyy HH:mm}" UniqueName="colClockInAt">
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn HeaderText="Clocked Out" CurrentFilterFunction="LessThanOrEqualTo" DataField="ClockedOutAt" DataType="System.DateTime" EditDataFormatString="dd-MMM-yyyy HH:mm" FilterControlAltText="Filter column1 column" FilterDateFormat="dd-MMM-yyyy HH:mm" PickerType="DateTimePicker" DataFormatString="{0:dd-MMM-yyyy HH:mm}" UniqueName="colClockOutAt">
                </telerik:GridDateTimeColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</div>
<telerik:RadAjaxLoadingPanel ID="radLoadingPanel" runat="server" Skin="Metro"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="radAjaxManager" runat="server" DefaultLoadingPanelID="radLoadingPanel">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="grdTimeSheets">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdTimeSheets" UpdatePanelCssClass="" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

with a combo box as follows:

<asp:DropDownList ID="ddlPayWeeks" runat="server" style="width: 200px;" OnSelectedIndexChanged="ddlPayWeeks_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>

and in the code behind:

protected void ddlPayWeeks_SelectedIndexChanged(object sender, EventArgs e)
{
    if (ddlPayWeeks.SelectedIndex == 0)
        return;
 
    string selectedValue = ddlPayWeeks.SelectedValue;
    string startDate = selectedValue.Before("_");
    string finishDate = selectedValue.After("_");
 
    DateTime filterStartDate = DateTime.Parse(startDate);
    DateTime filterFinishDate = DateTime.Parse(finishDate);
 
    grdTimeSheets.MasterTableView.GetColumn("colClockInAt").CurrentFilterValue = string.Format("{0:dd-MMM-yyyy HH:mm}", filterStartDate);
    grdTimeSheets.MasterTableView.GetColumn("colClockInAt").CurrentFilterFunction = GridKnownFunction.GreaterThanOrEqualTo;
    grdTimeSheets.MasterTableView.GetColumn("colClockOutAt").CurrentFilterValue = string.Format("{0:dd-MMM-yyyy HH:mm}", filterFinishDate);
    grdTimeSheets.MasterTableView.GetColumn("colClockOutAt").CurrentFilterFunction = GridKnownFunction.LessThanOrEqualTo;
    grdTimeSheets.MasterTableView.Rebind();
}
 

So after the ddlPayWeeks_SelectedIndexChanged has fired I see the records as displayed in ss1.png - Note how the filter text has been filled in but the filter is not applied. If I then open the filter I see that the correct filter function is selected (ss2.png) but it is only when I click on the already selected GreaterThanOrEqualTo that I see the filter applied as per ss3.png.

 So I am guessing I need to do something additional in ddlPayWeeks_SelectedIndexChanged to cause the filter to occur?

Eyup
Telerik team
 answered on 03 Jun 2015
1 answer
38 views

Hi,

I've got two browser windows open, each having the same URL with a RadGrid showing different data.

When I try to edit rows on either grid, sometimes (not always) I get the attached error message.  I have no idea why.  Has anyone encountered this?

Thanks!

Brian
Top achievements
Rank 2
Iron
 answered on 02 Jun 2015
1 answer
76 views

I have been looking for a working example of a LINE CHART that uses a linqdata source.  They have an example of a bar chart, and I changed out the series type with a telerik:lineseries and it is just not working.  

 

I am sure I am just missing something very easy here...  Does anyone know of an example combining these two?

This should be stupid easy I would think.

 

 

 

Danail Vasilev
Telerik team
 answered on 02 Jun 2015
3 answers
1.1K+ views

Hi,

I have a grid column as follows:

<telerik:GridDateTimeColumn CurrentFilterFunction="GreaterThanOrEqualTo" DataField="ClockedInAt" DataType="System.DateTime" EditDataFormatString="dd-MMM-yyyy HH:mm" FilterControlAltText="Filter column column" FilterDateFormat="dd-MMM-yyyy HH:mm" PickerType="DateTimePicker" UniqueName="column">
</telerik:GridDateTimeColumn>

I want to change the Time Picker displayed in the filter bar to:

  1. Display time in 24 hour format viz HH:mm
  2. Change the interval from 1 hour to 30 mins

How can I achieve this?

 

 

Konstantin Dikov
Telerik team
 answered on 02 Jun 2015
9 answers
336 views
Hi,
This seems like a bug to me. I'm trying to persist the state of my RadPanelBar using PersistStateInCookie, which works fine if I'm only updating the RadPanelBar by itself. However, if I try to update the RadPanelBar via another control on the page, like the click event in code-behind of a button, it doesn't work.
I understand from doing a little research that the cookie resets the state of the RadPanelBar in (or possibly just before) the PreRender event of the RadPanelBar control. This means that it will always overwrite the selection of a RadPanelItem by another control on the page.

Here is an example of what I'm talking about:
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="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>  
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        <Scripts> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
        </Scripts> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="LoadingPanel1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="dCurrentPage">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="dCurrentPage" /> 
                    <telerik:AjaxUpdatedControl ControlID="btnSelectPanel" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadPanelBar1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="dCurrentPage" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" /> 
                    <telerik:AjaxUpdatedControl ControlID="btnSelectPanel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
      
      
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="30" 
        BackColor="#E0E0E0">  
        <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            alt="Loading..." style="border: 0;" /> 
    </telerik:RadAjaxLoadingPanel> 
    <div style="float: left; margin-bottom: 10px; width: 270px">  
        <telerik:RadPanelBar runat="server" ID="RadPanelBar1" PersistStateInCookie="True" 
            OnPreRender="RadPanelBar1_PreRender">  
            <Items> 
                <telerik:RadPanelItem Text="ASP.NET controls" Expanded="true">  
                    <Items> 
                        <telerik:RadPanelItem NavigateUrl="Default.aspx?page=menu" Text="RadMenu">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem NavigateUrl="Default.aspx?page=combobox" Text="RadComboBox">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem NavigateUrl="Default.aspx?page=panelbar" Text="RadPanelBar">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem NavigateUrl="Default.aspx?page=treeview" Text="RadTreeView">  
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem Text="WinForms controls">  
                    <Items> 
                        <telerik:RadPanelItem Text="RadMenustrip" NavigateUrl="Default.aspx?page=menustrip">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="RadTabStrip" NavigateUrl="Default.aspx?page=tabstrip">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="RadToolStrip" NavigateUrl="Default.aspx?page=toolbarstrip">  
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem Text="Other projects">  
                    <Items> 
                        <telerik:RadPanelItem Text="SiteFinity" NavigateUrl="Default.aspx?page=sitefinity">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="Reporting" NavigateUrl="Default.aspx?page=reporting">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="RadAjax" NavigateUrl="Default.aspx?page=ajax">  
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelBar> 
    </div> 
    <div class="smallModule" id="dCurrentPage" runat="server">  
        <div class="rc1">  
            <div class="rc2">  
                <div class="rc3">  
                    <strong>Current page:</strong> 
                    <style="padding: 5px 10px">  
                        <asp:Literal runat="server" ID="Label1"></asp:Literal></p>  
                </div> 
            </div> 
        </div> 
    </div> 
    <br /> 
    <div style="display:block">  
        <asp:Button ID="btnSelectPanel" runat="server" Text="Select RadTabStrip" OnClick="btnSelectPanel_Click" /><br /> 
        <href="Default2.aspx">Go to Default2.aspx</a> 
    </div> 
    </form> 
</body> 
</html> 
 

Default.aspx.cs
using System;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
 
using System.Data;  
using System.Configuration;  
using System.Web.Security;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using Telerik.Web.UI;  
 
public partial class Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        Response.Cache.SetCacheability(HttpCacheability.NoCache);  
              
    }  
 
    protected void RadPanelBar1_PreRender(object sender, EventArgs e)  
    {  
        RadPanelItem selectedItem = RadPanelBar1.SelectedItem;  
        if (selectedItem != null)  
        {  
            Label1.Text = String.Format("This is the {0} page", selectedItem.Text);  
        }  
    }  
 
    protected void btnSelectPanel_Click(object sender, EventArgs e)  
    {  
        RadPanelItem item = RadPanelBar1.FindItemByText("RadTabStrip");  
        RadPanelItem owner = item.Owner as RadPanelItem;  
        owner.Expanded = true;  
        item.Selected = true;  
    }  
}  
 

Default2.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> 
 
<!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> 
    This is another page.<br /> 
        <href="Default.aspx">Go back to Default.aspx</a> 
    </div> 
    </form> 
</body> 
</html> 
 

If you select an item in the RadPanelBar, then click on the link to Go to Default2.aspx, then go back to the Default.aspx page you will see that the state has been maintained. However, if you click the button to select the "RadTabStrip" item in the RadPanelBar you will see that it does not work.
If you change PersistStateInCookie to False, clicking on the button does work, but obviously the the state is not maintained.

I'm sure there is a workaround for this, but it seems to me that it breaks the coding convention of the Page event lifecycle.
Any thoughts?

James Steward
Nencho
Telerik team
 answered on 02 Jun 2015
2 answers
90 views

Hi,

I have a RCB that is configuresd

 

<telerik:RadComboBox ID="RadComboBoxPlan" runat="server" AutoPostBack="True"
                        OnSelectedIndexChanged="OnPlanTextChanged" ChangeTextOnKeyBoardNavigation="True"
                        DropDownAutoWidth="Enabled"
                        EnableLoadOnDemand="True" Filter="StartsWith" DataSourceID="PlanSqlSource" DataTextField="name"      DataValueField="plan_id"
                        OnItemsRequested="RadComboBoxPlan_OnItemsRequested" ViewStateMode="Enabled">
                        <DefaultItem Text="Choose plan" Value="-1" />
 
                    </telerik:RadComboBox>

 OnPlanTextChanged updates a radgrid that is dependent â€‹on the value of the RCB asn the RadComboBoxPlan_OnItemsRequested updates the select statement of the sql source. It works fine when selecting a value for the first time, but if the dropdown button is clicked again the list will be empty save for the currently selected item. If focus is lost to the RCB and the dropdown button is clicked again the list will populate as expected.

Is there a way i can make sure the list is populated correctly the first time?

 

Kind regards

Casper 

Casper
Top achievements
Rank 1
 answered on 02 Jun 2015
1 answer
70 views

Hi,

 I must be missing something, but I am trying to place RadAjaxLoadingPanel in over the top of the updating control centred vertically and horizontally. But whatever I try the RadAjaxLoadingPanel is just placed in the top left corner of the updating control.

 I.e in the example below the RadAjaxLoadingPanel1 is always displated in the top left corner of Panel1. Any ideas greatfull received.

       

<asp:Panel ID=Panel1 runat="server">
    <div id="edit">
        <div class="heading"><asp:Label ID="FormTitle" runat="server"></asp:Label></div>
        <p />
        <div>
           <table border="1">...</table>
           <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="1" MinDisplayTime="1000" backgroundPosition="center">
               <asp:Image ID="Image1" runat="server" ImageUrl="../img/ajax-loader.gif" AlternateText="loading">
               <asp:Image>
           </telerik:RadAjaxLoadingPanel>
        </div>

    </div>

</asp:panel>

Viktor Tachev
Telerik team
 answered on 02 Jun 2015
3 answers
186 views

I have a radcombobox in my page (using Skin="WebBlue").

The page has loaded with different css style based on if it is rendered on mobile or desktop(style.css & stylemobile.css)

Now what I want to do is set different size property for the radcombobox: Height,Width and DropDownWidth etc. How do I overwrite it with css in different file? or is there any better solution?

I used table in HeaderTemplate and ItemTemplate, is it possible to use different width for cells based on mobile/desktop?

Thanks.

Magdalena
Telerik team
 answered on 02 Jun 2015
1 answer
98 views

Hello,

For security reasons, I do not want to show some of the parent items, but want to show only their children. How can this be achieved?  

Thanks

 

 

 

Viktor Tachev
Telerik team
 answered on 02 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?