Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views
Hi,

I encounter the following problem for pages with a grid with data and at least one grouping row:

When the grid DO NOT have the focus and the user do a carrige return
  • the grid intersept the event and collapse (or expend) the first grouping row.
  • the keyboard event is consumed: (that is no more available for other controls)

How could I disable this behavior?

Thanks in advance.

Florian
Tsvetoslav
Telerik team
 answered on 20 Apr 2010
2 answers
115 views
I have a grid that I'm populating with the contents of datasource1. Because the select statement for datasource1 changes, I never know what columns I'm going to be getting when the grid is populated with data when the page loads. One unfortunate result of this is that the columns don't get named.

How would I go about assigning names to the columns? All I need to do is give the columns in the grid the same name as the columns in the select statement.

Thank you!

Bryan
bdrennen
Top achievements
Rank 1
 answered on 20 Apr 2010
5 answers
297 views
Hello all, first I am sorry if that question has already been asked and answered. If this is the case I would be grateful if someone can point me to the answer. Due to my work slow connection it take more then 2 minutes to get a page loaded and searching through is not an option at the moment.

Here is my problem, I have two radDateTimePicker, one for Starting Date and one for Ending Date. I have set the DateInput format as follow.

<telerik:RadDateTimePicker ID="rdtp_StartingDate" runat="server">                                                  
    <DateInput DateFormat="dd/MM/yyyy hh:mm tt" DisplayDateFormat="dd/MM/yyyy hh:mm tt" runat="server"></DateInput> 
    <Calendar DayCellToolTipFormat="dd/MM/yyyy" runat="server"></Calendar> 
</telerik:RadDateTimePicker> 
 

The culture of the two calendars is set from the codebehind, since the application I'm supporting, support two language.

When I retrieve the values from the database, the date input format is displayed correctly. When I click on the Calendar image to get the Calendar popup, I mouse over the dates and the tooltip is fine to. The problem arise when I click on a date, if the day I select is smaller then 12 it switch the format to default. i.e. selecting first of june will display "06/01/2009 12:00 AM" instead of "01/06/2009 12:00 AM" if I pick 21st of june it will display "21/06/2009 12:00 AM" which is the correct format.

Thank you in advance.
Martin
Telerik team
 answered on 20 Apr 2010
2 answers
173 views
I have a grid that has 2 labels in the CommandItemTemplate. I also have a RadWindow that I use for a user to set the upper and lower limit values to use on a couple of columns in the grid. When the RadWindow closes I want to take teh values from that window and update the text int he CommandItemTemplate.
My values are returning from the RadWindow correctly and they are being put into 2 variables - lowerLimit and upperLimit.
The label fields on the CommandItemTemplate are:

<

 

asp:Label ID="lblLLimit" runat="server" Text="= over 85%"></asp:Label>

 

<

 

asp:Label ID="lblULimit" runat="server" Text="= over 100%"></asp:Label>

 

How can I update the labels text to display the values returned from the RadWindow programatically?
Thank you very much for your help.
Chris

 

 

 

 

Chris LaFrancis
Top achievements
Rank 1
 answered on 20 Apr 2010
1 answer
97 views
I want to show other team mate my project but when try to open it on other system it give message error creating the controls.
Do i have to install telerik controls on there system also and also on the web hosting site too, please help me.
T. Tsonev
Telerik team
 answered on 20 Apr 2010
1 answer
128 views
Hi there,

I am dynamically loading the treenodes of RadTreeView from Xml.
I am able to succcessfully load them if its not a postback.
But, my issue is, since I am loading the treeview inside a usercontrol, OnNodeClick it is calling the page_load of Aspx and then comes back to the treeview usercontrol.

Instead, I want to avoid calling aspx page_load on nodeclick inside this usercontrol. Is there any way, I can handle this node_click event inside usercontrol itself?

Note: I am making use of RadAjaxmanager and updatedcontrol for treeview which is not refreshing the page though but still calling aspx page_load.

Thanks
T. Tsonev
Telerik team
 answered on 20 Apr 2010
6 answers
221 views
Hi.

I have a problem entering custom html tags into the editor.
for example (paste only this html into the editor):
<h1>Test template</h1> 
Content starts here: <br /> 
<placeholder name="Content" /> 
<br /> 
Content ends here! 
will be replaced to (after a roundtrip to the server for saving):
<h1>Test template</h1> 
Content starts here: <br /> 
<name="Content">Content ends here!</p> 

So my custom <placeholder> tag is getting merged with the last <br /> and replaced by <p>.
How do I get around this? I have set StripFormattingOptions="None" and AllowScripts="true" on the editor.

If I encapsulate my custom tag inside a <div> tag, everything works fine:
<h1>Test template</h1> 
Content starts here: <br /> 
<div><placeholder name="Content" /></div>  
<br /> 
Content ends here! 
(will be preserved after roundtrip to the server).

Thanks,
JJ
Beelze
Top achievements
Rank 1
 answered on 20 Apr 2010
1 answer
124 views
HI

I am trying to use the RadWindow to show a larger version of an image on the page.
However I am getting different results in IE8 and Firefox3.

(I am using skin Black):

1 ) Title
In Firefox, the title bar displays the image filename, not the Title specified in RadWindow
settings (and there is no page to load where I could specify the page title.)
IE displays it correctly

2 ) Window backgound
In IE, the window background is white so I get a white border round the image, but Firefox does it correctly as Black

How can I fix these anomalies?

Thanks for any help!

Clive

Thanks

Clive
Georgi Tunev
Telerik team
 answered on 20 Apr 2010
3 answers
161 views
Hi all

Having a bit of a dilemma, does anyone know how to do the following:

I've bound an SqlDataSource to a RadGrid which displays various data but typically an AreaID and an InterviewerID amongst many. When in EditMode, the only thing that I want to edit is the InterviewerID, so I have added a ComboBox in the EditItemTemplate and a label in the ItemTemplate.

My ComboBox is populated by another SqlDataSource containing ALL Interviewers but also holds a value for the AreaID (such as InterviewerID, Interviewer, AreaID).

What I would like to do is pick up the AreaID from the row currently being edited and limit the contents of the Combo to only Interviewers in that Area.

There must be a simple way of doing it but I'ts not making itself obvious to me - can anyone help please?

Thanks in anticipation.

Steve :o)
The Wire
Top achievements
Rank 1
 answered on 20 Apr 2010
4 answers
172 views

Hi,
I have develop 2 screen which is quite similiar.
These screen allow user to enter some value in the textboxes given and and a RadInputManager to validate the data inputed.
1 screen is working fine but 1 screen are not.
The screen which is not working, is because of the javascript not able to get the RadInputManager instance.
This screen has 1 textbox only, this textbox will have different validation depends on the different parameter passed in.
Each parameter will use different validation for the textbox.

Below are my codes, please advice.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="~/Transaction/TransactionUpdate.aspx.cs" 
    Inherits="Transaction.TransactionUpdate" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!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 id="Head1" runat="server">  
    <title></title>  
    <style type="text/css" media="all">  
        @import "/css/standard.css";  
    </style> 
      
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /><meta http-equiv="PRAGMA" content="NO-CACHE" /><meta http-equiv="CACHE-CONTROL" content="NO-CACHE" /><meta http-equiv="EXPIRES" content="-1" /> 
    <script src="/js/jquery-1.2.6.min.js" type="text/javascript"></script> 
    <script src="/js/common.js" type="text/javascript"></script> 
</head> 
<body> 
    <form id="form1" runat="server" autocomplete="off">  
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Default, Label" /> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">  
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadWindowManager ID="radWindowManager" runat="server">  
        </telerik:RadWindowManager> 
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <script language="javascript" type="text/javascript">  
            Telerik.Web.UI.RadWindowUtils.Localization =  
            {  
                 
                "Close": '<asp:Literal ID="radClose" runat="server" Text="<%$Resources:Button, btnClose%>" />',  
                "OK": '<asp:Literal ID="radOk" runat="server" Text="<%$Resources:Button, btnOk%>" />',  
                "Cancel": '<asp:Literal ID="radCancel" runat="server" Text="<%$Resources:Button, btnCancel%>" />',  
                "Yes": '<asp:Literal ID="radYes" runat="server" Text="<%$Resources:Common, rbtnYes%>" />',  
                "No": '<asp:Literal ID="radNo" runat="server" Text="<%$Resources:Common, rbtnNo%>" />'  
            };  
        </script> 
        <telerik:RadInputManager ID="radMgr" runat="server">  
            <telerik:TextBoxSetting BehaviorID="text">  
                <Validation IsRequired="true" /> 
                <TargetControls> 
                    <telerik:TargetInput ControlID="txtNewValue" /> 
                </TargetControls> 
            </telerik:TextBoxSetting> 
            <telerik:NumericTextBoxSetting BehaviorID="numeric" MinValue="0" MaxValue="999999">  
                <Validation IsRequired="true" /> 
                <TargetControls> 
                    <telerik:TargetInput ControlID="txtNewValue" /> 
                </TargetControls> 
            </telerik:NumericTextBoxSetting> 
        </telerik:RadInputManager> 
        <telerik:RadScriptBlock ID="scriptBlock1" runat="server">  
            <script language="javascript" type="text/javascript">  
                function GetRadWindow()  
                {  
                    var oWindow = null;  
                    if (window.radWindow) oWindow = window.radWindow;  
                    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
                    return oWindow;  
                }  
 
                function PopulateData()  
                {  
                    var oObject = GetRadWindow().argument;  
                    document.getElementById('hdnTransactionId').value = oObject.TransactionId;  
                    document.getElementById('hdnValueType').value = oObject.ValueType;  
                    document.getElementById('hdnOldValue').value = oObject.OldValue;  
                    document.getElementById('hdnOriginalValue').value = oObject.OriginalValue;  
                    $("#spanOriginalValue").text(oObject.OldValue);  
 
                    $("#spanTitle").text('<asp:Literal ID="ltrlUpdateTransaction" runat="server" Text="<%$ Resources:ltrlUpdateTransaction%>"></asp:Literal>');  
                    $("#spanOriginal").text('<asp:Literal ID="ltrlOriginal" runat="server" Text="<%$ Resources:ltrlOriginal%>"></asp:Literal>');  
                    $("#spanNewVaue").text('<asp:Literal ID="ltrlUpdated" runat="server" Text="<%$ Resources:ltrlUpdated%>"></asp:Literal>');  
                          
                    if (oObject.ValueType == 'ValueType1')  
                    {  
                        document.getElementById('txtNewValue').setAttribute('maxLength', "6");  
                    }  
                    else if (oObject.ValueType == 'ValueType2')  
                    {  
                        document.getElementById('txtNewValue').setAttribute('maxLength', "10");  
                    }  
                    SetMandatory(oObject.ValueType);  
                }  
                  
                function Close(valueType, newValue)  
                {  
                    var arg = new Object();  
                    arg.ValueType = valueType;  
                    arg.NewValue = newValue;  
                     
                    var oWnd = GetRadWindow();  
                     
                    oWnd.close(arg);  
                }  
 
                function SetMandatory(valueType)  
                {  
                    if (IsInputManagerValid("<%=radMgr.ClientID %>"))   
                    {  
                        var im = $find("<%=radMgr.ClientID %>");  
                        var text = im.get_inputSettings('text');  
                        var numeric = im.get_inputSettings('numeric');  
                        if (valueType == 'ValueType1')  
                        {  
                            text.set_isRequired(false);  
                            numeric.set_isRequired(true);  
                        }  
                        else if (valueType == 'ValueType2')  
                        {  
                            text.set_isRequired(true);  
                            numeric.set_isRequired(false);  
                        }  
                    }  
                }  
 
                $(document).ready(function()   
                {  
                    PopulateData();  
                });  
            </script> 
        </telerik:RadScriptBlock>   
        <telerik:RadAjaxPanel ID="ajaxPnlTransactionUpdate" runat="server" EnableEmbeddedScripts="true" LoadingPanelID="RadAjaxLoadingPanel1">    
            <div id="divUpdateTransaction" runat="server">  
                <table width="98%" cellpadding="5px">  
                    <tr> 
                        <td> 
                            <div> 
                                <h2> 
                                    <span id="spanTitle"><asp:Literal ID="ltrlTitle" runat="server" Text="Update Transaction"></asp:Literal></span>  
                                </h2> 
                                <div> 
                                    <table width="98%">  
                                        <tr> 
                                            <td style="width: 70%">  
                                                <span id="spanOriginal"><asp:Literal ID="ltrlOriginal" runat="server"></asp:Literal></span>  
                                            </td> 
                                            <td style="width: 30%">  
                                                <span id="spanOriginalValue"><asp:Literal ID="ltrlOriginalValue" runat="server" Text=""></asp:Literal></span>  
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td style="width: 70%">  
                                                <span id="spanNewVaue"><asp:Literal ID="ltrlNewVaue" runat="server"></asp:Literal></span>  
                                            </td> 
                                            <td style="width: 30%">  
                                                <asp:TextBox ID="txtNewValue" runat="server" Width="80px" MaxLength="10"></asp:TextBox> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </div> 
                                <div class="clear">  
                                    &nbsp;  
                                </div> 
                                <div id="divButton" runat="server" style="width:90%">  
                                    <class="buttons">  
                                        <asp:Button ID="btnSave" runat="server" Text="<%$ Resources:Button, btnSave %>" OnClick="btnSave_OnClick" /> 
                                        <asp:Button ID="btnCancel" runat="server" Text="<%$ Resources:Button, btnCancel %>" OnClientClick="GetRadWindow().close()" /> 
                                    </p> 
                                </div> 
                                <div id="hdnHidden">  
                                    <asp:HiddenField ID="hdnTransactionId" runat="server" /> 
                                    <asp:HiddenField ID="hdnValueType" runat="server" /> 
                                    <asp:HiddenField ID="hdnOldValue" runat="server" /> 
                                    <asp:HiddenField ID="hdnOriginalValue" runat="server" /> 
                                    <asp:HiddenField ID="hdnTimeStampId" runat="server" /> 
                                </div> 
                            </div> 
                        </td> 
                    </tr> 
                </table> 
            </div> 
        </telerik:RadAjaxPanel> 
    </form> 
</body> 
</html> 
 


using System;  
using System.Collections;  
using System.Collections.Generic;  
using System.Configuration;  
using System.Data;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
using Telerik.Web.UI;  
 
namespace Transaction  
{  
    public partial class TransactionUpdate : BasePage  
    {
        #region Variables  
        string TransactionDetailsLastUserId = "TransactionDetailsLastUserId";  
        string TransactionDetailsTimeStampId = "TransactionDetailsTimeStampId";
        #endregion  
 
        #region Event Handlers  
        protected void Page_Load(object sender, EventArgs e)  
        {  
        }  
 
        protected void btnSave_OnClick(object sender, EventArgs e)  
        {  
            try 
            {  
                string transactionID = hdnTransactionId.Value.ToString().Trim();  
                long? customerId = SessionManager.UserSettings.DataContext.CustomerID;  
                string valueType = hdnValueType.Value.ToString().Trim();  
                string oldValue = hdnOldValue.Value.ToString().Trim();  
                string newValue = txtNewValue.Text.ToString().Trim();  
                long userId = SessionManager.UserSettings.AppUserID;                  
                //call to DB to fetch the corresponding TimestampId and Last User ID  
                CommonFacade commonFacade = new CommonFacade();  
                DataSet dsValues = (DataSet)commonFacade.GetTimestampFromTransactionId(transactionID);  
                long lastUserId = string.IsNullOrEmpty(dsValues.Tables[0].Rows[0]["Last_UserId"].ToString()) ? 0 : Convert.ToInt64(dsValues.Tables[0].Rows[0]["Last_UserId"]);  
                byte[] oldTimeStampId = (byte[])dsValues.Tables[0].Rows[0]["Timestamp_Id"];  
                byte[] newTimeStampId = null;  
                if (!object.Equals(oldValue.ToString().Trim(), newValue.ToString().Trim()))  
                {  
                    ReportBiz report = new ReportBiz();  
                    newTimeStampId = report.TransactionValueUpdate(transactionID, valueType, newValue, userId, oldTimeStampId);  
                    Session[TransactionDetailsTimeStampId] = newTimeStampId;  
                    if (string.IsNullOrEmpty(newValue)) newValue = hdnOriginalValue.Value;  
                }  
 
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "CloseWindow""<script type=\"text/javascript\">Close('" + valueType + "', '" + newValue + "');</script>"false);  
            }  
            catch (BusinessException ex)  
            {  
                this.ShowRadErrorAlert(ex.Key);  
            }  
        }
        #endregion  
    }  
}  
 
Wai Loon Ho
Top achievements
Rank 1
 answered on 20 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?