Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
155 views
Since upgrading to q3 2012 from q2, an extraneous extra border is added around the control. Not the border that is set by the control's property settings but another around the control...  is this a bug?

Here is a sample code page and screenshot (IE9 on Win7)  (attached)

I have deliberately made the actual control border red solid to show the issue.

=======================================================================
<%@ Page Language="VB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="SM1"></asp:ScriptManager>
    <telerik:radrotator id="RadRotator1" runat="server" datasourceid="XmlDataSourceSubsKeyInfo"
        frameduration="8000" rotatortype="AutomaticAdvance" scrolldirection="Up" height="190px"
        width="178px" backcolor="#eeeeff" BorderStyle="Solid" BorderColor="#ff0000">
        <ItemTemplate>
            <div style="width: 166px; height: 178px; padding: 0 6px;"><br /><br />
                <%# XPath("product") %>
            </div>
        </ItemTemplate>
    </telerik:radrotator>
    <asp:XmlDataSource ID="XmlDataSourceSubsKeyInfo" runat="server" DataFile="~/xml/test.xml">
    </asp:XmlDataSource>
    </form>
</body>
</html>
==========================================

Aarsh
Top achievements
Rank 1
 answered on 14 Nov 2012
12 answers
298 views
PDF export of X columns is producing another extra X blank columns.  This must be some really simple error, but I just can't find it.  Here's the code:
<asp:Button ID="ExportToPDF" runat="server" Text="ExportToPDF"
    OnClick="ExportToPDF_Click"/>
<telerik:RadGrid ID="RadGrid2" runat="server" GridLines="Vertical" AutoGenerateColumns="false" Width="800px">
<ExportSettings ExportOnlyData="true"></ExportSettings>
</telerik:RadGrid>
    public partial class gridtest : System.Web.UI.UserControl
    {
        int iNumCols = 5;
 
        protected void Page_Init(object sender, EventArgs e)
        {
            CreateRadGrid2();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                FillRadGrid2();
        }
 
        internal void CreateRadGrid2()
        {
            for (int iCol = 0; iCol < iNumCols; iCol++)
            {
                GridBoundColumn col = new GridBoundColumn();
                col.HeaderText = "Col"+iCol.ToString();
                col.DataField = "Col"+iCol.ToString();
                RadGrid2.MasterTableView.Columns.Add(col);
            }
        }
 
        internal void FillRadGrid2()
        {
            // create an empty data table, matching the bound columns of the grid
            DataTable dt = new DataTable();
            for (int iCol = 0; iCol < iNumCols; iCol++)
                dt.Columns.Add("Col"+iCol.ToString());
 
            // fill in the data for the rows
            for (int iRow = 0; iRow < 5; iRow++)
            {
                DataRow dr = dt.NewRow();
                for (int iCol = 0; iCol < iNumCols; iCol++)
                    dr["Col" + iCol.ToString()] = "R" + iRow.ToString() + "C" + iCol.ToString();
                dt.Rows.Add(dr);
            }
            RadGrid2.DataSource = dt;
            RadGrid2.DataBind();
        }
 
        protected void ExportToPDF_Click(object sender, EventArgs e)
        {
            this.RadGrid2.MasterTableView.ExportToPdf();
        }
}

The resulting PDF is attached.
Kostadin
Telerik team
 answered on 14 Nov 2012
1 answer
65 views
Hello

I am using radgrid q3 2009. I am setting information in a CommandItemTemplate in the pre_render event of the grid. However if the grid is grouped and/or has a master/detail relationship the information in the CommandItemTemplate is lost/reset when you expand the group or details table. Please can you advise how to resolve this

thanks
Angel Petrov
Telerik team
 answered on 14 Nov 2012
5 answers
189 views
Hi, all.

I have a question regarding the RadGrid's view state on the client side.  I have a RadGrid sitting inside an .ascx control that is embedded inside a RadDock.  I have the grid's EnableViewState property set to "true" and the GroupingEnabled property set to "true", the MasterTableView's GroupLoadMode set to "client" and the CientSettings have the AllowDragToGroup property set to "true".  The grid is wrapped in an UpdatePanel, and it's also tied to a RadAjaxManagerProxy control since I already have a RadAjaxManager on the master page.

The control loads just fine, and I can group one item.  However, when I go to group another item, the first grouping level is removed; I can effectively have only one group set (the data itself is rebinding properly).  If I try a sort while the group is in place, it's also removed after the sort finishes. In addition, if I try to remove the one group that's there, I get an Index Out of Range Javascript error.

From what I can tell, I have the grid set up properly.  Is there something else I need to take into account to preserve the view state?
Jeff
Top achievements
Rank 1
 answered on 14 Nov 2012
3 answers
76 views
I have rad grid with item template containing rad control editor. It is used in dot net framework 4.0. The color of editor is showing grey and it is non editable in safari, Firefox and chrome. 

I tried setting external css using ContentAreaCss but it is not working.
Also, changed the ContentAreaMode to Div but it is not working.

Please provide a solution to make it work in all browsers.
Pavlina
Telerik team
 answered on 14 Nov 2012
2 answers
102 views
I have a RadGrid that gets it's data from a WCF data service that returns a DataTable. I'm using the grid's bulit in filtering ( RadFilter) amd I need to get the filter expression BEFORE the call to the data service. I can only seem to get the FilterExpression after the grid binds.
Jeff
Top achievements
Rank 1
Veteran
 answered on 14 Nov 2012
1 answer
193 views
I would appreciate help in getting following scenario working:

On Page_Init, RadGrid is created, with GridTemplateColumn. For this column, I need RadAutoCompleteBox in its EditItemTemplate.

1. Since EditItemTemplate does not exist untill Edit button is clicked ( "Unable to cast object of type 'Util.MyRadAutoCompleteTemplate' to type 'System.Web.UI.IBindableTemplate'"), I set the custom template as ItemTemplate.

2. When ItemTemplate is created (Page_Init), I set the DataSource

3. I tried both InputTypes, text and token

4. ViewState is enabled

Result is no lookup happens. I read about supplying the input text to data source query on the Page_Load manually, however I don't see this working with a dynamically created RadGrid.

Previous attempt includes, creating empty GridTemplateColumn on Page_Init, and adding RadAutoCompleteBox on grid_ItemCreated if in edit mode. In this scenario, item is populated correctly on load, I am able to set selected value on edit item, but main problem still remains, querying does not work.

Thanks.
Nencho
Telerik team
 answered on 14 Nov 2012
1 answer
216 views
Hello,

I have been trying to use the RadToolTipManager with a RadScheduler.
So far I have been able to make the ToolTip appear and show data.
However I have 2 problems:

1) When I put JavaScript inside the UserControl (.ascx), it seems like the javascript is not called (I get error "*FunctionName* is not defined").  I have to put the javascript inside the Page that calls the UserControl for it to work.

2) I have a RadListBox inside the UserControl, when I use $find('<%=lbAnnotations.ClientID%>') it returns null or $('lbAnnotations') returns length = 0.

I think I maybe missing something.  Here are the code blocks:

Inside calling page:
<telerik:RadToolTipManager runat="server" AnimationDuration="300" ShowDelay="200"
        HideDelay="1" ID="RadToolTipManager1" Width="480px" Height="227px" RelativeTo="Element"
        Animation="None" Position="BottomCenter" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" Skin="Telerik"
        ShowEvent="OnClick" HideEvent="ManualClose" Modal="true">
</telerik:RadToolTipManager>

Adding controls to ToolTipManager:
Private Sub scListeDoses_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles scListeDoses.AppointmentCreated
        If e.Appointment.Visible Then
            Dim ctrlId As String = e.Container.FindControl("btnNotification").ClientID()
            Dim aptId As String = e.Appointment.ID.ToString()
 
            RadToolTipManager1.TargetControls.Add(ctrlId, aptId, True)
        End If
    End Sub

TooltipManager AjaxUpdate:
 
Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As ToolTipUpdateEventArgs)
    Dim aptId As Integer
    Dim apt As Appointment
    If Not Integer.TryParse(e.Value, aptId) Then
        'The appoitnment is occurrence and FindByID expects a string
        apt = scListeDoses.Appointments.FindByID(e.Value)
    Else
        'The appointment is not occurrence and FindByID expects an int
        apt = scListeDoses.Appointments.FindByID(aptId)
    End If
 
    Dim ctrl As Control = Page.LoadControl("FADMToolTip.ascx")
    e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl)
    Dim details As FADMToolTip = DirectCast(ctrl, FADMToolTip)
    details.OrdoNoAuto = apt.Attributes("NoAutoOrdo")
    details.PresNoAuto = apt.Attributes("NoAutoPres")
    details.PatiNoAuto = apt.Attributes("PatiNoauto")
    details.PatiNumero = apt.Attributes("NumeroDossier")
    details.PatiNom = apt.Attributes("NomPatient")
    details.PatiPrenom = apt.Attributes("PrenomPatient")
    details.Medicament = apt.Attributes("NomMedicament")
    details.NumeroOrdo = apt.Attributes("Numero")
End Sub

UserControl for ToolTip:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="FADMToolTip.ascx.vb" Inherits="GESPHARxLite_2.FADMToolTip" %>
<%@ Import Namespace="GESPHARxLite_2.GestionMessages" %>
<%@ Import Namespace="GESPHARxLite_2.GesPharxWeb" %>
<%--Note: si on doit faire des scripts on doit les ajouter dans FADMElectronique.aspx, car le contrôle ASCX est dedans la FADM qui a déjà un RadScriptManager--%>
<style type="text/css">
    body, html, form  
    {
        height: 100%;
    }      
    .annotBouton
    {
        float: right;
        bottom: 2px;
        right: 2px;
        width: 35px;
    }
    .lblInfos
    {
        font-weight: bold;
        color: #707070;
    }
    .infoAnnot
    {
        float: left;
        width: 375px;
    }
    .listeAnnot
    {
        background-color: #d7f3ff;
        display: inline-block;
    }
    .listeAnnotInactif
    {
        background-color: #EBEBEC;
        display: inline-block;
    }
    .editBouton
    {
        padding: 5px;
        float: right;
        width: 35px;
    }
</style>
<link href="css/GESPHARxLite.css" rel="stylesheet" type="text/css" />
<div style="float:left; width: 100%;">
    <div class="annotBouton" style="float:right;" onclick="AjoutAnnot()">
        <img class="adminButton" src="Images/Icons/061-Plus-Icon.png" alt="Add" height="32"" />
    </div>
    <div style="float:left">
        <span class="lblInfos">
            <%=GetMessageEx(6795).Texte%></span>
        <br />
        <span>
            <asp:Label ID="lblInfoPatient" runat="server">
            </asp:Label>
        </span>
    </div>
</div>
<hr />
<div id="divListAnnot" style="float:left">
    <telerik:RadListBox ID="lbAnnotations" PersistClientChanges="true"
        runat="server" Visible="true" Height="170px" Width="450px"
        DataValueField="annot_noauto" >
        <ItemTemplate>
                <div id="divListe" class="listeAnnot" runat="server">
                    <div id="btnModifier" class="editBouton" onclick="ModifAnnot();" runat="server">
                        <img class="adminButton" src="Images/Icons/Edit32.png" alt="Edit" height="32"/>
                    </div>
                    <div class="infoAnnot">
                        <div>
                            <telerik:RadCodeBlock ID="RadCodeBlock9" runat="server">
                                <span class="FADMTextGras">
                                    <%=GetMessageEx(6054).Texte%>
                                </span>
                                <span class="FADMTextGras">
                                    <%#FormatPHDate(Eval("ANNOT_DATE_DEBUT"))%></span>
                                <span class="FADMTextGras">
                                    <%#FormatPHDate(Eval("ANNOT_HEURE_DEBUT"))%></span>
                                  
                                                                      
                                <span class="FADMTextGras">
                                    <%#IIf(GetNonDBNull(Eval("ANNOT_DATE_FIN")) = "", "", GetMessageEx(6055).Texte)%>                        
                                </span>
                                <span class="FADMTextGras">
                                    <%#IIf(GetNonDBNull(Eval("ANNOT_DATE_FIN")) = "", "", FormatPHDate(GetNonDBNull(Eval("ANNOT_DATE_FIN"))))%>
                                </span>
                                <span class="FADMTextGras">
                                    <%#Eval("ANNOT_HEURE_FIN")%> 
                                </span>
                                <span style="font-size: 11px;">
                                    <br /><%#Eval("ANNOT_DESCRIPTION")%>
                                </span>
                                <span class="FADMTextGras" style="<%#IIf(Eval("PANN_BLOQUER_ADM") = "1", "", "display:none")%>">
                                    <br />  
                                    <%#GetMessageEx(6800).Texte%>                                    
                                </span>
                            </telerik:RadCodeBlock>
                        </div>
                         
                    </div>
                </div>
        </ItemTemplate>
    </telerik:RadListBox>
</div>
 
<div id="divAjoutAnnot" style="float:left; display: none;">
    <div class="editBouton" onclick="CancelAnnot();">
        <img class="adminButton" src="Images/Icons/Cancel32.png" alt="Cancel" height="32"/>
    </div>   
</div>
 
<div id="divModifAnnot" style="float:left; display: none;">
    <div style="padding: 10px;clear:both;">
        <div id="divCode" style="margin-bottom: 10px">
            <div style="float: left;">
                <asp:Label ID="lblCode" class="FADMTextGras" runat="server">Code: </asp:Label>
            </div>           
            <div style="float: left;">
                  
                   
                <telerik:RadNumericTextBox ID="edCodeAnnot" runat="server" Width="60" MaxLength="20"
                    NumberFormat-DecimalDigits="0">
                </telerik:RadNumericTextBox>
            </div>
            <div class="spacer">
            </div>
        </div>
        <div>
            <asp:Label ID="lblDesc" class="FADMTextGras" runat="server">Description: </asp:Label>
        </div>
        <div>
            <telerik:RadTextBox ID="edDescriptionAnnot" runat="server" Width="450px" Height="100px"
                TextMode="MultiLine" MaxLength="500">
            </telerik:RadTextBox>
        </div>
        <div style="text-align: right; margin-top: 12px;">
             
            <telerik:RadButton runat="server" ID="btnConfirmAnnot" AutoPostBack="false"  OnClientClicked="CancelAnnot"
                ButtonType="StandardButton" Icon-PrimaryIconUrl="~/Images/Icons/055-Check-ok-Icon_16x16.png" >
            </telerik:RadButton>
            <telerik:RadButton runat="server" ID="btnAnnulerAnnot" AutoPostBack="false" OnClientClicked="CancelAnnot" Icon-PrimaryIconUrl="~/Images/Icons/056-Check-not-ok-Icon_16x16.png">
            </telerik:RadButton>
        </div>
    </div>
</div>
 
<telerik:RadScriptBlock ID="RadCodeBlockAnnot" runat="server">
    <script type="text/javascript">
 
        function AjoutAnnot()
        {
            $('#divListAnnot').hide();
            $('#divAjoutAnnot').show();
            $('#divModifAnnot').hide();
        }
 
        function ModifAnnot()
        {
            var currentAnnot = null;
            $('#divListAnnot').hide();
            $('#divAjoutAnnot').hide();
            $('#divModifAnnot').show();
            //var listeAnnot = $find('lbAnnotations'); //$find('<%=lbAnnotations.ClientID%>');
            //var item = listeAnnot.get_selectedItem();
            //alert(item.get_text());
        }
 
        function CancelAnnot()
        {
            $('#divListAnnot').show();
            $('#divAjoutAnnot').hide();
            $('#divModifAnnot').hide();
        }   
    </script>
 
</telerik:RadScriptBlock>


Thank you,

Jeremy
Marin Bratanov
Telerik team
 answered on 14 Nov 2012
1 answer
336 views
Dear ALL,

How to create and bind RadListView from code behind like Pege_load event and  all my data's are available in DataTable.how to bind and implement fully by code behind page..

Thanks,
Princy
Top achievements
Rank 2
 answered on 14 Nov 2012
1 answer
80 views
Hi All,

I have two RadTextBoxes in my form, One for name and other for roll number. I want the users to enter only numbers in one of the textbox. I dont want to use numeric textbox.

Thanks,
RT
Princy
Top achievements
Rank 2
 answered on 14 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?