Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
186 views
I am having an issue in clearing the contents of the DateInput box of a RadDateTimePicker via client-side javascript when invalid data has been entered.

In my scenario, I have two radio buttons (asp:RadioButton) that allow a user to select to either perform an action immediately or schedule the action for a future date/time.  The later radio button is coupled with a RadDateTimePicker.  If the user initially enters a date then switches to perform the action immediately, the RadDateTimePicker should be cleared.

If a valid date has been selected or entered, I am able to clear the contents with:

var dtTmPicker = $find("<%= SchedStartTime.ClientID %>");
dtTmPicker.clear();


However, if an invalid value has been entered for the date, the call to .clear() has no effect (because the underlying date value has not been set when the visible value is not valid).

Based on a few scattered forum posts, I have attempted to reset the invalid value, warning icon, and formatting on the field with:

var dtTmPicker = $find("<%= SchedStartTime.ClientID %>");
dtTmPicker.get_dateInput().set_textBoxValue(
"");
dtTmPicker.get_dateInput()._invalid =
false;
dtTmPicker.get_dateInput().updateCssClass();

This clears the text, but the warning icon and formatting remain.

Interestingly, I can set ._invalid=true and call .updateCssClass() to turn the validation icon/formattting on; and again set it to false to clear the validation icon/formatting.  But I can only do this when NO invalid value has been entered in the control.  Once an invalid value has been entered, I can only clear the text but not the icon/formatting.

Is there something else that needs to be done to clear the form and reset the validation?  Any help is greatly appreciated.


William
Top achievements
Rank 1
 answered on 04 Jun 2013
1 answer
117 views
I have a radgrid that I set the datasource to a datatable set from a dataset and bind it.  I manually setup (edit columns) the headers and have hidden some of the columns because I don't want them visible (ID field).  But when I click on the row (For Each item As GridDataItem In dgComp.SelectedItems)

I get the value of the comlumn (item("ID").Text)

But since I manually setup the Grid columns I set this columns visible property to False.  And now all I get in &nbsp as the result instead of the value.  If I set the columns visible property to True then I can get the true value.  I need the data in the grid but I dont want it to be visible how can I do this?  I see no datakeyfield property under edit columns just a DataField??

Thanks
Stefan
Top achievements
Rank 2
 answered on 04 Jun 2013
3 answers
165 views
1 week ago we pushed out a new release and have started seeing the following error a lot. It's been 8 weeks since our previous release and we are thinking an update has something to do with it. Any ideas what might be causing this? For the most part the uploads are successful so we don't know how to reproduce this error manually.
 

This is what we are currently running
Version: 2013.1.417.40

Path: ...\Telerik.Web.UI_2013_1_417_Dev_hotfix\Bin40\Telerik.Web.UI.dll

Runtime Version: v4.0.30319


-----Original Message-----
From: cmis@n3cn.org [mailto:cmis@n3cn.org]
Sent: Monday, May 13, 2013 8:54 AM
To: CMIS Error
Subject: unHandledException in CMIS - Page:/_dialog/UploadPatientAttachment/UploadPatientAttachment.aspx?RadUrid=eefdd2b0-33ab-46e2-9545-f4ed8efcf1c6
 
System.IO.FileNotFoundException: Could not find file 'C:\Applications\cmis.n3cn.org\Production\CaseManagement\App_Data\RadUploadTemp\vcfxlbc4.jsp'.
File name: 'C:\Applications\cmis.n3cn.org\Production\CaseManagement\App_Data\RadUploadTemp\vcfxlbc4.jsp'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at NCCCN.CMIS._dialog.UploadPatientAttachment.UploadPatientAttachment.buttonSubmit_Click(Object sender, EventArgs e) in C:\Websites\QA\CMISWeb\_dialog\UploadPatientAttachment\UploadPatientAttachment.aspx.cs:line 79
   at Telerik.Web.UI.RadButton.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
Time: 5/13/2013 8:54:24 AM
 
Source: mscorlib
Hristo Valyavicharski
Telerik team
 answered on 04 Jun 2013
6 answers
168 views
Hi,

I am using very complicated Ajax in my application. I only use RadAjaxManager and RadAjaxManagerProxy.

I have some asp:Panel that I put Ajax on it and inside it. When I look in the HTML code I get some empty div AjaxPanel (See attached image).

Why this is happening? This is happening when I have a ajaxfied asp:Panel with ascx inside it that has RadAjaxManagerProxy.

Thanks.



msigman
Top achievements
Rank 2
 answered on 04 Jun 2013
11 answers
227 views
I am wanting to know if this is the best solution and if ultimately if it is doable. I am having an issue with how I will be able to inject the wanted data from the radWindow into the editor window at the point of where the cursor is.

I working in the DNN framework and I have a need to create a custom button in the radEditor so that the Content Author can "Insert" a quote that is maintained in a separate DB as a library of sorts.

I have poured over everything and I think I can create the button and utilize the radWindow and in the radWindow, I will have it point to a page that uses a custom module I will be building to pull in the wanted data. I am wanting to mimic the image manager or the hyperlink manager in a way.

1) Choose the quote from a list or grid inside the radWindow
2) inject the value from  one of the fields into the editor.

i.e.     I pull up the radWindow showing the two  options with the 3 fields. ID, Quote, author. I choose option 1
<1> Quote #1 Me
<2> Quote #2 You

my editor would now display the following.
blah blah blah <1> blah blah blah

Thanks for any direction and or tips.

UPDATED:
I have the custom button and radwindow all hooked up. Still trying to figure out how to inject the text that is on the page into the editor. I'll update as I figure it out. But any direction in the mean time would be helpful.
Dobromir
Telerik team
 answered on 04 Jun 2013
1 answer
90 views
I'm using the TIMELINE view to display a business week's worth of appointments.  Users can double click on a day to add a new "appointment" - but I'd like them to be able to click the header for a specific day and go to a (custom) view for the day's appointments.  Is there any way to make the timeslot header a link/linkbutton?  I do this fine from the MONTH view by intercepting the NAV client side event and  checking the command.

Thanks,
Bill
Boyan Dimitrov
Telerik team
 answered on 04 Jun 2013
2 answers
69 views
Please forgive me if I am wrong, but it appears that this demo is missing code for the "Add new record" and "Refresh" link buttons.

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx

Can you please advise?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 04 Jun 2013
1 answer
249 views
Hello,

I have a radhtmlchart created dynamically like the programmic chart created demo. I also use ajax manager and asp panel to async update it every minute (asp timer). However when it's refreshing, the chart is blink once. i.e. the old chart disappears, only leaves grids there, then the new chart is loaded. It is a monitoring chart, I got a very good animation effect when I use radchart async update, exactly like the cpu monitoring in windows task manager. Is there a way I can get the same effect when using radhtmlchart?
Stamo Gochev
Telerik team
 answered on 04 Jun 2013
2 answers
125 views

Hi All,
I am trying to use RadGrid in a user control in sharepoint 2007 project. But when the grid is loaded, it generates a javascript error stating "Object Required, Line1 Char1".

When i click on edit button to edit my grid row, the control does not enter radGrid_ItemDataBound method. and hence the grid does not appear in edit mode. But it does execute radGrid_ItemCommand method. Only after clicking a button that causes postback event, the edit mode gridrow appears but without any data.

I am using a master page for the usercontrol
Following is the code
Master page code:

<%@ Register Assembly="Telerik.Web.UI, Version=****.*.****.**, Culture=neutral, PublicKeyToken=********"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

I have added RadAjaxManager in the master page.

<telerik:RadAjaxManager ID="AjaxManager1" runat="server"></telerik:RadAjaxManager>
UserControl.ascx
<%@ Register Assembly="Telerik.Web.UI, Version=****.*.****.**, Culture=neutral, PublicKeyToken=*********"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
……………………..
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7"
    MinDisplayTime="30" />
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgReportEditor">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgReportEditor" />
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
  
<table>
.....
.....
     <telerik:RadGrid ID="rgReportEditor" Skin="Windows7" GridLines="None" ItemStyle-BackColor="White"
                AlternatingItemStyle-BackColor="#EFEFEF" runat="server" AutoGenerateColumns="False"
                SelectedItemStyle-BackColor="blue" OnUpdateCommand="rgReportEditor_UpdateCommand"
                OnItemCommand="rgReportEditor_ItemCommand" OnEditCommand="rgReportEditor_EditCommand"
                OnItemDataBound="rgReportEditor_ItemDataBound">
                <MasterTableView InsertItemDisplay="Bottom" HorizontalAlign="NotSet" EditMode="InPlace"
                    TableLayout="Fixed" Frame="Border">
                    <HeaderStyle Font-Bold="true" BackColor="#BDBDBD" ForeColor="Black" />
                    <PagerStyle AlwaysVisible="true" />
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn">
                            <ItemStyle CssClass="MyImageButton" Width="7%" />
                            <HeaderStyle Width="7%" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Testing column">
                            <ItemStyle Width="17%" />
                            <HeaderStyle Width="17%" />
                            <ItemTemplate>
                                <asp:Label ID="lblValue" runat="server"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <%-- <telerik:RadComboBox ID="cboReportEditorColumn" Width="100%" runat="server" Skin="Office2007">
                                    </telerik:RadComboBox>--%>
                                <asp:DropDownList ID="ddlValue" runat="server">
                                </asp:DropDownList>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <%-- <telerik:GridButtonColumn ConfirmText="Delete this entry?" ConfirmDialogType="RadWindow"
                                ConfirmTitle="Attention" ConfirmDialogHeight="100" ConfirmDialogWidth="250" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" CommandArgument="Code">
                                <ItemStyle CssClass="MyImageButton" Width="3%" />
                                <HeaderStyle Width="3%" />
                            </telerik:GridButtonColumn>--%>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowColumnHide="True">
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                    <Resizing AllowColumnResize="True" EnableRealTimeResize="false" />
                </ClientSettings>
            </telerik:RadGrid>
  
.........
</table>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
</telerik:RadWindowManager>

UserControl.ascx.cs

protected void Page_Load(object sender, EventArgs e)
        {
  
                RadAjaxManager objRadAJAXManager = RadAjaxManager.GetCurrent(Page);
                objRadAJAXManager.ClientEvents.OnRequestStart = "onRequestStart";
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgReportEditor, rgReportEditor, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgReportEditor, RadWindowManager1, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgReportEditor, lblErrorYAxis);
  
    .................................................................
    .................................................................
    .................................................................
     }

Please  suggest how to make the grid work in edit mode.

Thanks,
Satbir










Satbir
Top achievements
Rank 1
 answered on 04 Jun 2013
1 answer
78 views
Hi,

I am new to Telerik and Sitefinity. I created a custom navigation widget below:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CresNavigation.ascx.cs" Inherits="SitefinityWebApp.Widgets.CresNavigation" %>
<telerik:RadMenu ID="cresRadMenu" runat="server" Skin="CrescentTopNav" EnableEmbeddedSkins="false">
    <DefaultGroupSettings RepeatColumns="7" RepeatDirection="Horizontal"/>
    <Items>
        <telerik:RadMenuItem Text="Operate" NavigateUrl="../operate">
            <Items>
                <telerik:RadMenuItem>
                    <ItemTemplate>
                        <table width="100%">
                            <tr>
                                <td valign="top" rowspan="2">
                                    <asp:Panel ID="panelInfo" runat="server" Width="300">
                                        <asp:Label ID="litInvestInfo" runat="server" Text="We have high-quality products."></asp:Label>
                                        <br />
                                        <br />
                                        <asp:ImageButton ID="imgInvestInfo" runat="server" ImageUrl="Images/icon_read_more.jpg" />
                                    </asp:Panel>                                
                                </td>
                                <td valign="top">
                                    <table width="100px">
                                        <tr>
                                            <td align="center">
                                                <asp:ImageButton ID="imgBtnNews" runat="server" ImageUrl="~/Widgets/Images/icon_areas.jpg" onmouseover="this.src='Widgets/Images/icon_areas_hover.jpg'" onmouseout="this.src='Widgets/Images/icon_areas.jpg'" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center">
                                                <asp:HyperLink ID="HyperLink2" runat="server" Text="Areas" CssClass="itemTitle"></asp:HyperLink>
                                            </td>
                                        </tr>
                                    </table>                                                                
                                </td>
                            </tr>
                        </table>

                    </ItemTemplate>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>


I've added this widget to Sitefinity and I am able to use it inside a page. I would to add the ability to change the text and image from within Sitefinity. I understand I need to create control designer but I am having difficulty implementing it. 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Sitefinity.Web.UI.ControlDesign;
using Telerik.Web.UI;

namespace SitefinityWebApp.Widgets
{
    [ControlDesigner(typeof(CresNavigationDesigner))]
    public partial class CresNavigation : System.Web.UI.UserControl
    {
        public string CorporateInfo { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (string.IsNullOrEmpty(CorporateInfo))
            {
               // do nothing;
            }
            else
            {
                RadMenuItem rmi = cresRadMenu.FindItemByText("Corporate");

                if (rmi != null)
                {
                    Response.Write("YEEEESSSS!!!!");
                    Label lCorporateInfo = rmi.FindControl("lCorporateInfo") as Label;
                    if (lCorporateInfo != null)
                    {
                        Response.Write("Found it!");
                    }
                }
            }
        }
    }
}

I can't seem to find the Label control from the code behind. I think I am approaching this wrong. Could you please help?? 


Thank you!
Pavel Benov
Telerik team
 answered on 04 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?