Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
198 views
Hi

I have updated to Q1 2009 versions and the facelift has affected my CSS overrides.
Using the Black skin,  how can I reduce the amount of margin or padding on either side of the
items in the child menu that appears on mousover, and also when the child item is clicked?

Thanks

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 05 May 2009
3 answers
172 views
I have a grid that I have both enableAlternatingitems and enableRowhoverStyle set to true.  I would like the EnableRowHoverStyle to work on the Alternate rows also.  is this possible and if so how?
Sebastian
Telerik team
 answered on 05 May 2009
1 answer
302 views
Hello,

in my applikation I need in my RadWindow to call a a code behind function in the window which has opened this RadWindow.

How can I do this?

thanks

Christian
Shinu
Top achievements
Rank 2
 answered on 05 May 2009
1 answer
100 views
I apologize in advance if I'm asking something that's been answered in an FAQ. I didn't see anything under browser support and did a quick search of the forums and didn't find anything with respect to if/how this control will render in an x64 broswer.

Thanks.
Lini
Telerik team
 answered on 05 May 2009
3 answers
209 views
Dear all,

I think (hope?) that it is simple but can't see why my grid is not refreshing...

I have a (ASP) table holding four filter criteria used to select data displayed in the grid.
My controls have auto post and I know they fire since I can debug the Page_Load event but for some reason my grid does not refresh on the browser.

Could you spot if I am doing something drastically wrong?

Through RadAjaxManager, I am asking to refresh the grid based on the ASP table (can't see the controls in RadAjaxManager smart tag) and/or RadAjaxManager itself.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AttributesV3.aspx.cs" Inherits="FoxAdmin.AttributesV3" 
    EnableEventValidation="false" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Src="Controls/DisplayErrorV3.ascx" TagName="DisplayError" TagPrefix="uc2" %> 
<!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 id="HiddenFields" style="visibility: hidden"
        <asp:HiddenField ID="txtNodeKey" runat="server" /> 
        <asp:HiddenField ID="txtShowFVOptions" runat="server" Value="1" /> 
    </div> 
    <div> 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        </telerik:RadWindowManager> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGridAttributes" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="tblFilterOptions"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGridAttributes" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
        <asp:UpdatePanel ID="updError" runat="server" UpdateMode="Always"
            <ContentTemplate> 
                <uc2:DisplayError ID="DisplayError1" runat="server" /> 
            </ContentTemplate> 
        </asp:UpdatePanel> 
         
        <asp:Table ID="tblFilterOptions" runat="server" HorizontalAlign="Center" ToolTip="Filter the Properties" 
            Width="100%" BorderStyle="Solid"
            <asp:TableRow> 
                <asp:TableCell ID="tcPropertyTypeFilter" runat="server"
                    &nbsp;Type: 
                    <telerik:RadTextBox ID="txtPropertyDescFilter" runat="server" Wrap="False" AutoPostBack="True" 
                        Width="75px" /> 
                </asp:TableCell> 
                <asp:TableCell ID="tcPropertyGroup" runat="server"
                    &nbsp;Group: 
                    <telerik:RadComboBox ID="cboPropertyGroup" runat="server" Width="150px" AutoPostBack="True" 
                        NoWrap="True" DropDownWidth="250px" /> 
                </asp:TableCell> 
                <asp:TableCell ID="tcDataType" runat="server"
                    &nbsp;Data Type: 
                    <telerik:RadComboBox ID="cboDataType" runat="server" Width="80px" AutoPostBack="True" 
                        NoWrap="True" DropDownWidth="100px" /> 
                </asp:TableCell> 
                <asp:TableCell ID="tcFutureValues" runat="server"
                    &nbsp;Future Values: 
                    <telerik:RadComboBox ID="cboFutureValues" runat="server" Width="70px" AutoPostBack="True" 
                        NoWrap="True" DropDownWidth="100px" /> 
                </asp:TableCell> 
            </asp:TableRow> 
        </asp:Table> 
         
        <telerik:RadGrid ID="RadGridAttributes" runat="server" OnNeedDataSource="RadGridAttributes_NeedDataSource" 
            AutoGenerateColumns="False" GridLines="None" EnableViewState="False" AllowCustomPaging="True" 
            AllowPaging="True"
            <MasterTableView CellSpacing="-1" EnableViewState="false"
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="mp_Key" HeaderText="Property Key" UniqueName="column" 
                        Display="false" /> 
                    <telerik:GridBoundColumn DataField="pt_Desc" HeaderText="Property Type" UniqueName="column" 
                        Display="true" /> 
                    <telerik:GridBoundColumn DataField="DataValue" HeaderText="Value" UniqueName="column" 
                        Display="true" /> 
                    <telerik:GridBoundColumn DataField="mp_ValidFrom" HeaderText="ValidFrom" UniqueName="column" 
                        DataFormatString="{0:dd/MM/yyyy}" Display="true" /> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 
 

Thanks for your time


Eric
Eric
Top achievements
Rank 1
 answered on 05 May 2009
1 answer
155 views
So, 

I'm having a bit of an issue trying to select the date the user selected from a "load on demand" client-side bound combobox.

<telerik:RadComboBox ID="healthNumberCombo" Width="250px" AutoPostBack="true" EmptyMessage="Health Number" AllowCustomText="true" runat="server" HighlightTemplatedItems="true" 
                 EnableLoadOnDemand="true" LoadingMessage="Loading ..." Height="273px" 
                 OnClientItemsRequesting="onItemsRequesting" OnClientItemDataBound="onItemDataBound" 
                 OnClientSelectedIndexChanged="onSelectedIndexChanged"
                <WebServiceSettings Method="GetPatientList" Path="Services/AutoComplete.asmx" /> 
            </telerik:RadComboBox> 
<div id="myTemplate" class="sys-template"
                <div> 
                    <b>Name:&nbsp;</b>{{FullName}}<br /> 
                    <b>DOB:&nbsp;</b>{{BirthDate.format("MM/dd/yyyy")}}<br /> 
                    <b>HC#:&nbsp;</b>{{HealthNumber}} 
                </div>               
            </div> 
function onItemDataBound(sender, eventArgs)  
        { 
            var item = eventArgs.get_item(); 
            var dataItem = eventArgs.get_dataItem(); 
 
            item.get_attributes().setAttribute("hc", dataItem.HealthNumber); 
            item.get_attributes().setAttribute("dob", dataItem.BirthDate); 
             
            item.set_value(dataItem.PatientID); 
 
            dataItem.Index = item.get_index(); 
 
            var template = new Sys.UI.Template($get("myTemplate")); 
            template.instantiateIn(item.get_element(), dataItem); 
        } 
 
function onSelectedIndexChanged(sender, eventArgs) { 
 
                var item = eventArgs.get_item(); 
                sender.set_text(item.get_attributes().getAttribute("hc")); 
 
                var dob = item.get_attributes().getAttribute("dob"); 
                var dobPicker = $find('<%= dobPicker.ClientID %>'); 
                 
                debugger
                if (dobPicker != null) { 
                    dob1.set_selectedDate(dob);  
                } 
            } 
 

And all that happens is the date picker displays the warning image (like incorrect input) and nothing will display. The combobox value dataItem.BirthDate comes from a webservice which uses LINQ to get the data from a Patient table, where BirthDate is of type DateTime (which is why I specify the format in the template, or it'll display everything in the object (date and time and timezone, etc etc)

I've tried creating a new date object, i've tried splitting the date into a 3 part array as I read somewhere .. nothing works.

Telerik 2009.1.402.35
Atanas Korchev
Telerik team
 answered on 05 May 2009
1 answer
92 views

My manager is set up like so.

 <

 

telerik:RadToolTipManager ID="RadToolTipManager1" Width="400px" 
 HideEvent="LeaveTargetAndToolTip"

 

 

 

 

AutoCloseDelay="1000000000"

 

 

 

 

RelativeTo="Element"  

 

 

 

runat="server" Animation="Slide" Position="BottomRight" >

With the AutoCloseDelay being set high (not sure based on some info from your site.  In IE7, when I stay on the target the tooltip remains in view.  However, if I navigate over the top of the toolip it disappears immediately. 

Any ideas?

Steve

 

 

 

 

Svetlina Anati
Telerik team
 answered on 05 May 2009
1 answer
183 views
I'm working to update an existing application.  Currently when you do a rowClick on a RadGrid, the application will update another control.  I'd like to add a javascript confirm to that so, if the other control has changed, the user is reminded to save or cancel their changes.  However, regardless of what I pick on the confirm, the postback always occurs.  I assume that the javascript built in to the control runs after my confirm and still does the postback regardless of what I say. Is there a way I can keep the postback from occuring if the confirm returns false?


String getConfirmScript = "function getConfirm() { if (document.getElementsByName('_isUpdated').Value == '1') { if(!confirm('You changes have not been saved. Do you want to continue?')) { return false; } } }";

 

cm.RegisterClientScriptBlock(this.GetType(), "getConfirm", getConfirmScript, true);

 

 

_riskGrid =

new RadGrid();

 

 

 _riskGrid.EnableViewState =

true;

 

 

 _riskGrid.AutoGenerateColumns =

false;

 

 

 _riskGrid.Width =

Unit.Pixel(300);

 

 

 

//_riskGrid.Attributes.Add("onclick", "if (document.getElementsByName('_isUpdated').Value == '1') { return confirm('You changes have not been saved. Do you want to continue?'); }");

 

 

 

_riskGrid.AllowPaging = false;

 

 

 _riskGrid.AllowSorting =

false;

 

 

 

_riskGrid.ClientSettings.ClientEvents.OnRowClick =

"getConfirm";

Thanks,
Matt


 

 

 

 

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 05 May 2009
5 answers
139 views

I have created a user control that uses a tooltip to display a message to the user (success, error and exception messages).

ctlClientMessage.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctlClientMessage.ascx.cs"   
Inherits="KHSUserControls.ctlClientMessage" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
    <telerik:RadToolTip ID="ClientSideMessageTip" runat="server" RelativeTo="BrowserWindow" Position="BottomRight"   
    VisibleOnPageLoad="true" Animation="Fade" Width="300px" Height="120px" OffsetX="0" OffsetY="0" ShowCallout="false" 
    Skin="Black">  
        <div style="text-align:center; vertical-align: middle;">  
            <div> 
                <h4> 
                    <asp:Label ID="ClientSideMessage" runat="server" ForeColor="white" Text=""></asp:Label> 
                </h4> 
            </div> 
        </div> 
    </telerik:RadToolTip>         

ctlClientMessage.ascx.cs
using System;  
using System.ComponentModel;  
using System.Drawing;  
 
namespace KHSUserControls  
{  
    public partial class ctlClientMessage : System.Web.UI.UserControl, System.ComponentModel.IComponent  
    {  
        public enum MessageType { Error, Success, Information, Exception } ;  
        private string _clientMessage = "";  
 
        /// <summary>  
        /// Auto close delay in milliseconds.  
        /// </summary>  
        [Bindable(true), Category("Data"), Browsable(true), DescriptionAttribute("Auto close delay in milliseconds."),  
         EditorBrowsable(EditorBrowsableState.Always)]  
 
        public int AutoCloseDelayValue { getset; }  
 
        public ctlClientMessage()  
        {  
            AutoCloseDelayValue = 5000;  
        }  
 
        protected override void OnInit(EventArgs e)  
        {  
            if (AutoCloseDelayValue != 0)  
            ClientSideMessageTip.AutoCloseDelay = AutoCloseDelayValue;  
            _clientMessage = "";  
            ClientSideMessage.Text = "";  
            ClientSideMessageTip.VisibleOnPageLoad = false;  
        }  
 
        /// <summary>  
        /// Show client side message. If method is called twice, show the first message unless the new message is an exception.  
        /// </summary>  
        /// <param name="msgType"></param>  
        /// <param name="autoHide"></param>  
        /// <param name="message"></param>  
        public void ShowPageMessage(MessageType msgType, bool autoHide, string message)  
        {  
            if ((_clientMessage == "") || (MessageType.Exception == msgType))  
            {  
                switch (msgType)  
                {  
                    case MessageType.Error:  
                    case MessageType.Exception:  
                        ClientSideMessage.ForeColor = Color.Red;  
                        break;  
                    case MessageType.Success:  
                        ClientSideMessage.ForeColor = Color.Green;  
                        break;  
                    case MessageType.Information:  
                        ClientSideMessage.ForeColor = Color.White;  
                        break;  
                }  
                ClientSideMessageTip.VisibleOnPageLoad = true;  
                _clientMessage = message;  
                ClientSideMessage.Text = _clientMessage;  
                ClientSideMessageTip.ManualClose = !autoHide;  
            }  
            else 
            {  
                return;  
            }  
        }  
    }  

Usage in page.aspx
.  
.  
.  
            </div>  
        </div>                  
    </div>      
        <uc1:ctlClientMessage ID="ClientMessage" runat="server"/>       
    </telerik:RadAjaxPanel>  
.  
.  

page.aspx.cs
        protected void Next_Click(object sender, EventArgs e)  
        {  
            if (NextClaim())  
            {  
                UpdateClaimCount();  
                ClientMessage.ShowPageMessage(ctlClientMessage.MessageType.Information, true"Next record.");  
            }  
            else 
                ClientMessage.ShowPageMessage(ctlClientMessage.MessageType.Information, true"Last record reached.");  
        }  
 


Now the problem is, I am using an ajaxpanel in the page.aspx with the tooltip user control. When I go to this page, I display a message using the tooltip user control but, when I do a postback (Caused by a combobox loading data) the same tooltip message is displayed on the page again. I only want to show the message when I call ClientMessage.ShowPageMessage procedure.


Any ideas?
Svetlina Anati
Telerik team
 answered on 05 May 2009
1 answer
102 views
Dear sir,

I have an combo boxs to fill Country,state, city at client side,..the problem is when page goes postback its selected values is lost.
how can I stop it?

thanks and reagrds,
Neha
Princy
Top achievements
Rank 2
 answered on 05 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?