Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
164 views
I am trying to just get this page to render. I am not doing any databinding behind the scenes on the datetimepickers. But, if I remove them, then the page renders and I can bind the data when clicking the link in the gridview. Also, they render correctly when they are not inside an UpdatePanel. But inside the update panel, I get the error specified in the title. Can someone please help? Thanks

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/nextEMRM.Master" 
    CodeBehind="scheduler.aspx.vb" Inherits="nextEMRWeb.scheduler" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="nextEMRContentPlaceHolder" runat="server"> 
    <style> 
        .updateProgress 
        { 
            border-width: 1px; 
            border-style: solid; 
            background-color: #CCCCCC; 
            position: absolute; 
            z-index: 100001; 
            width: 260px; 
            height: 100px; 
        } 
        .updateProgressMessage 
        { 
            margin: 3px; 
            font-family: Trebuchet MS; 
            font-size: small; 
            vertical-align: middle; 
        } 
    </style> 
    <input id="btnTrigger" runat="server" onserverclick="btnTrigger_Click" type="button" 
        style="display: none;" /> 
    <cc1:TabContainer ID="tabSchedulerContainer" runat="server" CssClass="TabControl" 
        OnClientActiveTabChanged="clientActiveTabChanged"> 
        <cc1:TabPanel ID="panelSearch" runat="server" HeaderText="Search"> 
            <HeaderTemplate> 
                Search 
            </HeaderTemplate> 
            <ContentTemplate> 
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> 
                    <ContentTemplate> 
                        <asp:LinkButton ID="LinkButton1" runat="server" Style="display: none;">LinkButton</asp:LinkButton> 
                        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" 
                            TargetControlID="LinkButton1" PopupControlID="pnlAppointment" BackgroundCssClass="modalBackground"> 
                        </cc1:ModalPopupExtender> 
                        <asp:Panel Style="display:none;" runat="server" ID="pnlAppointment" CssClass="modalPopup"> 
                            <table style="width: 401px; height: 186px"> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Provider : 
                                    </td> 
                                    <td style="width: 125px"> 
                                        <asp:DropDownList ID="providerDropDownList" runat="server" Width="180px" AppendDataBoundItems="true" 
                                            AutoPostBack="false" DataSourceID="providersObjectDataSource" DataTextField="fullname" 
                                            DataValueField="id"> 
                                            <asp:ListItem Value="0" Text="Select a Physician"></asp:ListItem> 
                                        </asp:DropDownList> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Start Time: 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <telerik:RadDateTimePicker ID="radStartTime" runat="server"> 
                                        </telerik:RadDateTimePicker> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        End Time: 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <telerik:RadDateTimePicker ID="radEndTime" runat="server"> 
                                        </telerik:RadDateTimePicker> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Patient : 
                                    </td> 
                                    <td style="width: 125px"> 
                                        <asp:Label Visible="true" runat="server" ID="lblPatientID"></asp:Label><asp:Label 
                                            runat="server" ID="lblPatient"></asp:Label> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        First Name : 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <asp:TextBox ID="txtFName" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Last Name : 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <asp:TextBox ID="txtLName" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Date Of Birth : 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <asp:TextBox ID="txtDOB" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Address : 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <asp:TextBox ID="txtAddress" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"> 
                                        Town : 
                                    </td> 
                                    <td style="width: 122px"> 
                                        <asp:TextBox ID="txtTown" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px; height: 1px"> 
                                        Zip Code : 
                                    </td> 
                                    <td style="width: 122px; height: 1px"> 
                                        <asp:TextBox ID="txtPostCode" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px; height: 1px"> 
                                        Phone : 
                                    </td> 
                                    <td style="width: 122px; height: 1px"> 
                                        <asp:TextBox ID="txtPhone" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px; height: 1px"> 
                                        Note : 
                                    </td> 
                                    <td style="width: 122px; height: 1px"> 
                                        <asp:TextBox ID="appointmentNoteTextBox" runat="server" TextMode="MultiLine" Rows="3" 
                                            Width="180px" Enabled="true"> 
                                        </asp:TextBox> 
                                    </td> 
                                </tr> 
                            </table> 
                        </asp:Panel>                         
                        <div> 
                            <p> 
                                &nbsp;</p> 
                            <p> 
                                <span class="fieldLabels">First Name: </span> 
                                <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">Last Name:</span><asp:TextBox ID="txtLastName" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">City:</span><asp:TextBox ID="txtCity" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">Zip:</span><asp:TextBox ID="txtZip" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">&nbsp; </span> 
                                <asp:Button CssClass="firstBottomButtons" ID="btnSearchPatients" runat="server" Text="Search Patients" /> 
                            </p> 
                        </div> 
                        <p> 
                            <asp:GridView ID="patientGridView" runat="server" AutoGenerateColumns="False" DataSourceID="patientObjectDataSource" 
                                Visible="false" EmptyDataText="No Record Available" CssClass="grid2" RowStyle-Height="25" 
                                Width="98%" PageSize="10" OnRowCommand="patientGridView_RowCommand" AllowPaging="true" 
                                AlternatingRowStyle-BackColor="WhiteSmoke" HeaderStyle-BackColor="#ddedf3"> 
                                <Columns> 
                                    <asp:TemplateField> 
                                        <ItemTemplate> 
                                            <%#Eval("LastName") %>, 
                                            <%#Eval("FirstName")%> 
                                        </ItemTemplate> 
                                    </asp:TemplateField> 
                                    <asp:BoundField DataField="ssn" /> 
                                    <asp:BoundField DataField="dobStr" /> 
                                    <asp:BoundField DataField="city" /> 
                                    <asp:BoundField DataField="state" /> 
                                    <asp:BoundField DataField="zip" /> 
                                    <asp:TemplateField> 
                                        <ItemTemplate> 
                                            <asp:LinkButton CommandName="view" CommandArgument='<%#Eval("id") %>' ID="View" runat="server" 
                                                Text="View Appointments" /> 
                                            | 
                                            <asp:LinkButton CommandName="make" CommandArgument='<%#Eval("id") %>' ID="Make" runat="server" 
                                                Text="Make Appointment" /> 
                                        </ItemTemplate> 
                                    </asp:TemplateField> 
                                </Columns> 
                                <HeaderStyle BackColor="#DDEDF3" /> 
                                <AlternatingRowStyle BackColor="WhiteSmoke" /> 
                            </asp:GridView> 
                        </p> 
                    </ContentTemplate> 
                </asp:UpdatePanel> 
            </ContentTemplate> 
        </cc1:TabPanel> 
        <cc1:TabPanel ID="panelCalendar" runat="server" HeaderText="Calendar"> 
            <ContentTemplate> 
                <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional"> 
                    <Triggers> 
                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" /> 
                    </Triggers> 
                    <ContentTemplate> 
                        <telerik:RadScheduler Visible="false" runat="server" ID="RadScheduler1" Width="750px" 
                            SelectedView="TimelineView" TimeZoneOffset="00:00:00" DayStartTime="07:00:00" 
                            DayEndTime="19:00:00" DataSourceID="appointmentsPhysiciansObjectDataSource" DataKeyField="appointmentID" 
                            DataSubjectField="appointmentNote" DataStartField="startTime" DataEndField="endTime"> 
                            <AppointmentTemplate> 
                                <div style="width: 750px;"> 
                                    <asp:Literal ID="AppointmentSubject" runat="server" Text='<%# Eval("Subject") %>'></asp:Literal> 
                                    (<asp:Literal ID="AppointmentStartTime" runat="server" Text='<%# Eval("start", "{0:t}") %>'></asp:Literal> 
                                    - 
                                    <asp:Literal ID="AppoitmentEndTime" runat="server" Text='<%# Eval("end", "{0:t}") %>'></asp:Literal>) 
                                </div> 
                            </AppointmentTemplate> 
                        </telerik:RadScheduler> 
                    </ContentTemplate> 
                </asp:UpdatePanel> 
            </ContentTemplate> 
        </cc1:TabPanel> 
    </cc1:TabContainer>  
    <div id="updateProgressDiv" class="updateProgress" style="display: none"> 
        <div align="center" style="margin-top: 13px;"> 
            <img alt="Loading" src="images/simple.gif" /> 
            <span class="updateProgressMessage">Loading ...</span> 
        </div> 
    </div> 
    <asp:ObjectDataSource ID="appointmentsPhysiciansObjectDataSource" runat="server" 
        SelectMethod="selectAllAppointments" TypeName="nextEMRDataLayer.appointment" 
        DataObjectTypeName="nextEMRDataLayer.appointment"></asp:ObjectDataSource> 
    <asp:ObjectDataSource ID="patientObjectDataSource" runat="server" SelectMethod="searchPatients" 
        TypeName="nextEMRDataLayer.appointment" DataObjectTypeName="nextEMRDataLayer.appointment"> 
        <SelectParameters> 
            <asp:Parameter Name="firstname" /> 
            <asp:Parameter Name="lastname" /> 
            <asp:Parameter Name="city" /> 
            <asp:Parameter Name="zip" /> 
        </SelectParameters> 
    </asp:ObjectDataSource> 
    <asp:ObjectDataSource ID="providersObjectDataSource" runat="server" SelectMethod="selectAllPhysicians" 
        TypeName="nextEMRDataLayer.users" DataObjectTypeName="nextEMRDataLayer.users"> 
    </asp:ObjectDataSource> 
 
    <script language="javascript" type="text/javascript"> 
        var _updateProgressDiv; 
 
        function pageLoad(sender, args) { 
            //  register for our events 
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest); 
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest); 
 
            _updateProgressDiv = $get('updateProgressDiv'); 
        } 
 
        function beginRequest(sender, args) { 
            //  get the gridview element 
            var tabContainer = $get('<%= Me.tabSchedulerContainer.ClientID %>'); 
 
            // make it visible 
            _updateProgressDiv.style.display = ''; 
 
            // get the bounds of both the gridview and the progress div 
            var tabContainerwBounds = Sys.UI.DomElement.getBounds(tabContainer); 
            var updateProgressDivBounds = Sys.UI.DomElement.getBounds(_updateProgressDiv); 
 
            //  center of gridview 
            var x = tabContainerwBounds.x + Math.round(tabContainerwBounds.width / 2) - Math.round(updateProgressDivBounds.width / 2); 
            var y = tabContainerwBounds.y + Math.round(tabContainerwBounds.height / 2) - Math.round(updateProgressDivBounds.height / 2); 
 
            //  set the progress element to this position 
            Sys.UI.DomElement.setLocation(_updateProgressDiv, x, y); 
        } 
 
        function endRequest(sender, args) { 
            // make it invisible 
            _updateProgressDiv.style.display = 'none'; 
        } 
 
        function clientActiveTabChanged(sender, args) { 
            //  trigger the async-postback 
            if (sender.get_activeTabIndex() == 1) { 
                // load tab1 
                __doPostBack('<%=btnTrigger.UniqueID %>', ''); 
            } 
        } 
 
    </script> 
 
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="rightColumnContentPlaceHolder" runat="server"> 
</asp:Content> 
 

Pavlina
Telerik team
 answered on 25 Oct 2010
1 answer
157 views
Hello,

I would like to ask you the following:

1. Is there a way to hide the input textbox field of RadAsyncUpload control?
2. Is there a way to change the text of the button "Select" of RadAsyncUpload control?



Thanks in advance!

Yana
Telerik team
 answered on 25 Oct 2010
6 answers
241 views
Hi,

I have a deployment of the RadEditor in SPS2007, where the RadEditor control needs to be no wider than 480px, and display all of the toolbar icons.

In previous versions of the RadEditor there was a property of the ConfigFile.xml called 'ToolsOnPage', which could be set to false, to allow the 'ToolsHeight' and 'ToolsWidth' properties to be configured (in fact there is still an old broken link to this property on the ToolsHeight page see: http://www.telerik.com/help/aspnet/editor/radeditor-telerik.webcontrols.radeditor-toolsheight.html ). 

However, without the ToolsOnPage property, there doesn't seem to be an obvious way to reduce the width of the control below c. 660px, without icons on the toolbar becoming obscured. 

So, is there a simple way to increase the number of rows that the toolbar icons are displayed over (so that I can reduce the radeditor control's width back to 480px)?


NB, I haven't changed the default configuration in any of the files other than the ConfigFile.xml, which is currently set with the following:

<configuration>
   <property name="ToolbarMode">ShowOnFocus</property>
  <property name="Skin">Vista</property>
  <property name="Height">300px</property>
  <property name="Width">660px</property>
  <property name="DialogHandlerUrl">~/Telerik.Web.UI.DialogHandler.axd</property>
</configuration>

Regards,

Rob
Robert
Top achievements
Rank 1
 answered on 25 Oct 2010
1 answer
204 views
I've noticed that while I can force a style onto a target control using Javascript, such as changing the border or the color of the text, I cannot force a new class onto a target control. The commands simply don't seem to work. Is there a way to do this? I'm looking at doing something like the code below, which makes extensive use of jQuery.

$("input[Validators]").each(function() {
    var validators = $(this).attr("Validators");
    if (validators) {
        var isValid = true;
        $(validators).each(function() {
            if (this.isvalid !== true) isValid = false;
        });
 
        //This works:
        var strColor=isValid?"#fff":"#cc0000";
        $(this).css("color", strColor);
 
        //This does not:
        if (isValid) $(this).removeClass("ValidationError");
        else $(this).addClass("ValidationError");
    }
});

It appears that the RadInputManager control might have some way of controlling or maintaining the classes applied to each field, and I might need a way to thwart it. If there were an official, documented way to do this, I'd be glad to use that, but I did search and had no luck finding one - perhaps my documentation's a bit out of date, but a site search didn't turn anything up either.
Dimo
Telerik team
 answered on 25 Oct 2010
1 answer
161 views
Hi,
I am facing the following problem:

Visual Studio Version : 2008.

 

Editor Version : 2009.02.0826.35

 

Issue Description : Content inside RAD Editor does not get affected by selecting ZOOM level from the toolbar in Mozilla Firefox which works well in IE 7 & 8. For that please find attachment [zoom.png] in which you can clearly rectify the problem.

Kindly guide asap for the same.

Thanks.

Rumen
Telerik team
 answered on 25 Oct 2010
1 answer
133 views
Hi,

I have "main.aspx" page with one gridview and telerik rad window(with radwindowmanager) "radwind1"[No content in radwind1 just iframe]. When i click the linkbutton in a gridview "radwind1" popup will open another page "subpage.aspx" using iframe. Once i open the "subpage.aspx" there is one task assign button in it. Once i click that button, it  will open another rad window (without rad window manager ) "radwin2". In that radwind2 i have couple of dropdownlist with onselectchanged events. I can open this radwind2 by saying "visibleonpageload = true". But here the problem is for each and every selection changed event the radwin2 is closing and opening it. even when i close the radwind2 using cancel button click, it is closing and opening again.(Because of "viewonpageload = true" i guess). Now my question is how to open radwin2 using javascript. I tried the way you showed in below link. 

http://www.telerik.com/help/aspnet-ajax/window_programmingopeningfromwithin.html

But it didn't work. So Can anybody help me how to fix this. I can post the code if you want.

Thanks In Advance.
Georgi Tunev
Telerik team
 answered on 25 Oct 2010
3 answers
222 views
Hi,

We use related combos similar to the way it has been shown at the following link.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

We also have RadAjaxManager present on each page.

Now, I initiate javascript call "myCombo.requestItems(text, null)" . This performs perfectly and provide me updated combo.

But part from above process , my other requirement is setting up a hidden field on server side inside myCombo_ItemsRequested(object o , eventargs e) {}. For this I have tried,

1) setting hidden field directly , but when I check its value in javascript function OnClientsideItemsRequested() of same myCombo, then the value is not updated with server change. I also have this hidden field as updated control items of myCombo in
Rad ajax manager.

2) Thinking that this request will only update myCombo and not any other fields / controls. Instead of updating hidden field , I added an attribute to mycombo on server side and then check that attribute on client side. But I was also not able to fetch that attribute too on client side.

Function initiated from : myCombo.requestItems(text, null);
Server side function : myCombo_ItemsRequested(...)
Client side function: myComboOnItemsRequested(...)

Please suggest a way by which I can process any field or same combo in server side and use the updated value on client side.

Let me know if any other info is required.,

Thanks
Simon
Telerik team
 answered on 25 Oct 2010
1 answer
115 views
Problem: Loading of RadAjax is not working.

Scenario: I have two user controls in a Page. On click of button in UserControl1, I am updating the fields in UserControl2 and on click of button in UserControl2, I am populating a grid in Page. There is no MasterPage in this. I am loading this page in IFrame of other page which doesn't have any telerik controls.
Maria Ilieva
Telerik team
 answered on 25 Oct 2010
3 answers
203 views
I have the following Multicolumn Combobox on my page:
<telerik:RadComboBox ID="ddlLineNum" runat="server" DataValueField="all_line_id"
    DataTextField="line_number" Width="250px" Skin="Windows7" HighlightTemplatedItems="True"
    DropDownWidth="290px" AutoPostBack="True">
    <ItemTemplate>
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 75px;">
                    <%#DataBinder.Eval(Container.DataItem, "line_number")%>
                </td>
                <td style="width: 200px; padding-left: 5px;">
                    <%#DataBinder.Eval(Container.DataItem, "line_description")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>

The 1st column contains a telephone number.  I would like to format it so it actually looks like one.  I figured I could do it in the _ItemDataBound event, but I can't quite figure it out?
Simon
Telerik team
 answered on 25 Oct 2010
11 answers
442 views
I have a RADComboBox thats populated from a database (there are 4 items).  when I select the dropdown, the actual dropdown menu appears at the top of my page and not underneath the combo box.  Can anyone tell me why this should be ?

<telerik:RadComboBox ID="RadComboBoxNarrativeTypes" runat="server"  
                        EnableItemCaching="True" EnableLoadOnDemand="False" 
                        Width="250px" 
                        Skin="Sunset" 
            onselectedindexchanged="RadComboBoxCategories_SelectedIndexChanged" 
            AutoPostBack="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadComboBox>    
Simon
Telerik team
 answered on 25 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?