Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
69 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
85 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
171 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
193 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
303 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
67 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
2 answers
130 views
Hello,

I have a grid where I put all items in edit mode.  I would like users to be able to enter all the info, then save it when they are done.  However, I have a combo box that based on the selection I want to change values in a textbox in another column.  Right now I postback when the selected index is changed.  In doing so, I have to save all of the values in the grid to the database so they are not lost on postback.  I do need to query the database to make the decision on what to put into the text box.  Obviously having to save all the items each time and postback slows the performance significantly.  Is there any way to work around this without doing a postback?  The grid is bound to a SQL data source. 

Thanks!
Casey

Maria Ilieva
Telerik team
 answered on 14 Nov 2012
3 answers
98 views
Hi
How can I set caption to a radgrid insert form.
Shinu
Top achievements
Rank 2
 answered on 14 Nov 2012
3 answers
841 views
Hi,

How do I get the columnName/UniqueName of the field that has been clicked in order to sort the grid by that column?

Thank you !!
Shinu
Top achievements
Rank 2
 answered on 14 Nov 2012
2 answers
133 views
Hai
     I want to change the text of the editcommandcolumn in runtime. In aspx i gave an edit text "edit here". However i want to change the text based on my need. How should i change the code to accommodate this. Please share ideas if you have any.
thanks in advance
RT
Ryan
Top achievements
Rank 1
 answered on 14 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?