Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
614 views
Hi,

I need to disable/enable a raddatepicker on the change of a checkbox and on document.ready

Here is what i have

var picker = $find("<%= rdpStartDate.ClientID %>");
if(picker) {
  picker.set_enabled(false);
}

this is working fine except when the document.ready function calls this code.

Can anyone help?
Dimo
Telerik team
 answered on 15 Oct 2010
7 answers
286 views
Hi,

I am trying to use Telerik RadControls for .Net 4.0 controls in the same project as ASP.Net AJAX 3.5 controls.  Are the two compatible?  I get the following error when trying to run my project.

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll. 

I am trying to use the ModalPopupExtender in the ASP.Net Ajax 3.5 controls.  I have the following registered on my page.

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    </telerik:RadAjaxManager> 
Thanks,
Craig

T. Tsonev
Telerik team
 answered on 15 Oct 2010
1 answer
124 views
I've been toiling with this mess since last night, and it dawned on me I should just ask the pros.

Let me preface this by saying this is my first shot working with MySql, so that may have something to do with it.

It seems one of the columns in my grid is a GridCheckBox Column. The values in the MySql Database for True and False are 1 & 0 respectively.

However the data row will always remain unchecked for the checkbox regardless of whether it's set to 0 or 1 in the database.

I'm also using InPlace EditMode to edit the data.

Any help would be greatly appreciated. 

<telerik:GridCheckBoxColumn DataField="isadmin"  DataType="System.Boolean" HeaderText="Admin">
</telerik:GridCheckBoxColumn>
Martin
Telerik team
 answered on 15 Oct 2010
3 answers
63 views
On a single customer system, I have a scenario where if I upload multiple files either on thier own or in a batch, the filename seems to "stick", which as a result causes me to update the same data record over and over.   The getname function is working correctly because the display name field on the data record is being updated.   Not able to re-create on approx 10 other production/development systems on the same application build. 

Any ideas/suggestions?  below is the process code - 3rd line seems to be the problem, and given that it works on other systems seems to tie back to the GUI control or browser that is in some way unique to this installation.

 

 

 

For Each uploaditem As Telerik.Web.UI.UploadedFile In rupUploadFile1.UploadedFiles
      Dim objUploadStruct As New Structures.CommonStructures.UploadStruct
      objUploadStruct.originalfilepath = uploaditem.FileName
      objUploadStruct.CustomerID = userinfo.ActiveCustomerID(False)
      objUploadStruct.CategoryID = GetCategoryID()
      objUploadStruct.OrganizationID = GetOrganizationID()
      objUploadStruct.MessageTrackingid = GetMessageTrackingID
      objUploadStruct.imageusageid = enuImageUsageID
      objUploadStruct.RequestPoint = enuUploadTriggerPoint
      objUploadStruct.UserID = userinfo.UserID
      objUploadStruct.LinkedContent = LinkedContent
      objUploadStruct.FileName = uploaditem.GetName
      objUploadStruct.LanguageID = userinfo.DefaultLanguage
      objUploadStruct.Display_Name = Left(uploaditem.GetName, uploaditem.GetName.LastIndexOf("."))
      objUploadStruct.Description = Left(uploaditem.GetName, uploaditem.GetName.LastIndexOf(".")) + " from upload"
      'objUploadStruct.EntryTypeID = GetEntryTypeID(uploaditem.GetExtension)
      Try
          uploadedid = SaveUploadedFile(objUploadStruct, rupUploadFile1.TargetPhysicalFolder + "\" + uploaditem.GetName)
          If uploadedid = 0 Then
              bolIsError = True
              strErrorMessage.AppendLine(uploaditem.GetName & ": " & Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("UnspecifiedError", intLanguageCode) & "<br />")
          End If
      Catch ex As Exception
          strErrorMessage.AppendLine(uploaditem.GetName & ": " & Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString(ex.Message.Replace(" ", "").Replace(".", ""), intLanguageCode) & "<br />")
          bolIsError = True
      End Try
  Next


Thanks

Carlin

 

 

 

 

 

 

Genady Sergeev
Telerik team
 answered on 15 Oct 2010
6 answers
233 views
I have the menu in a master page, it works fine locally on the dev box but once deployed to the server the subitems fail to display.

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<%@ 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">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Epike Apps</title>

    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
    </telerik:RadCodeBlock>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript" language='javascript' src="<%=resolveurl("~/js/popupWin.js")%>"></script>
        <script language="javascript" type="text/javascript">
            function imgDisplaySwap(id, img) {
                var pnl = document.getElementById(id);
                var img = document.getElementById(img);
                if (pnl == null) { return }
                if (img == null) { return }
                var expand = pnl.style.display == '';
                pnl.style.display = (expand ? 'none' : '');
                img.src = (expand ? '<%=resolveurl("~")%>images/right.gif' : '<%=resolveurl("~/images/down.gif")%>');
            }
            function popupAttach(id) {
                var path;
                path = '<%=resolveurl("~/")%>protected/workorders/WOUploadFile.aspx?id=' + id
                var ret = OpenWindowModal(path, 500, 250, true);
                return ret;
            }
            function OpenWindowModal(pstrUri, pintWidth, pintHeight, pblnReloadWindowAfter) {

                var retVal = window.showModalDialog(pstrUri, window, "dialogWidth: " + pintWidth + "px; dialogHeight: " + pintHeight +

            "px; edge: Raised; status: No; scroll: Yes; resizable: Yes; center: Yes; help: No;");

                if (pblnReloadWindowAfter && retVal == "REFRESH") {
                    return true;
                }
                else {
                    return false;
                }
            }
            function CloseWindow()
            {
                var oWindow = GetRadWindow();  //Obtaining a reference to the current window
                oWindow.Close();
            }
            function GetRadWindow()
            {
               var oWindow = null;
               if (window.radWindow) oWindow = window.radWindow;
               else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
               return oWindow;
            }

            function SuccessUpload() {
                alert("File was successfully uploaded.");
                CloseWindow();
            }
            
        </script>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
        <link type="text/css" rel="Stylesheet" href="<%=resolveurl("~/css/master.css") %>" />

    </telerik:RadCodeBlock>    

</head>
<body runat="server" id="body">
    <form id="form1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>

<div id="masterHeader">
    <asp:Image ID="Image1" runat="server" ImageUrl="~/images/epikeappslogoWhite.png" />
    <div>
      <asp:Label ID="lblLogin" runat="server" Text=""></asp:Label>   
    </div>
</div>
<div id="masterSecondary">
    <div id="masterNav">
        <a href="<%=resolveurl("~/default.aspx") %>">
            <img height="151" alt="" src="<%=resolveurl("~/images/epike_01.gif")%>" width="153" border="0" />
        </a>
        <div id="masterNavWrapper">
            <asp:LinqDataSource ID="ldsMainNav" runat="server"
                ContextTypeName="SkywardDataContext" TableName="info_Navigations"
                OrderBy="NavOrder, displayText" Where="GroupName == @GroupName">
                <WhereParameters>
                    <asp:Parameter DefaultValue="appsMain" Name="GroupName" Type="String" />
                </WhereParameters>
            </asp:LinqDataSource>        
            <telerik:RadMenu ID="rmMainNav" runat="server" DataFieldID="id"
                        DataFieldParentID="parentid" DataNavigateUrlField="url"
                        DataSourceID="ldsMainNav" DataTextField="displayText"
                    DataValueField="value" BorderStyle="None"
                    Flow="Vertical" Font-Names="Verdana" CssClass="radNav"
                EnableEmbeddedSkins="False">
            </telerik:RadMenu>
            <telerik:RadMenu ID="RadMenu1" Runat="server" DataFieldID="id"
                DataFieldParentID="parentid" DataNavigateUrlField="url"
                DataSourceID="ldsMainNav" DataTextField="displayText" DataValueField="value"
                Skin="Default">
            </telerik:RadMenu>
        </div>
    </div>
    <div id="masterContent">
        <div>
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

            </asp:ContentPlaceHolder>
        </div>
    </div>
</div>



    </form>
</body>
</html>

html,body
{
    width:100%;
    margin:0px;
}

#masterHeader
{
    background-color:#990000;
    float:left;
    width:100%;
    height:60px;
    min-width:1000px;
}

#masterSecondary
{
    /*background-color:white;*/
    float:left;
    clear:both;
    width:100%;
    min-width:1000px;
}

#masterContent
{
    /*background-color:blue;*/
    float:left;
    width:auto;
    min-width:825px;
    max-width:80%;
    margin-top:10px;
}

#masterHeader img
{
    margin:10px 0px 0px 220px;
}

#masterHeader div
{
    background-color:#990000;
    margin:20px 20px 0px 0px;
    *margin:-30px 20px 0px 0px; /*IE hack*/
    text-align:right;
    color:White;
    float:right;
    width:400px;
}



#masterContent > div
{
    /*background-color:green;*/
    margin:0px 10px 10px 10px;
}

#masterNav
{
    background-color:#990000;
    float:left;
    clear:left;
    width:175px;
    margin-top:-60px;
}

#masterNav img
{
    margin:5px 0px 20px 5px;
}

a
{
    outline:none;
}
Alejandro Quezada
Top achievements
Rank 1
 answered on 15 Oct 2010
1 answer
152 views
Currently I'm using the v2.0.50727 of the editor. But I've started to notice problems with IE8. Specifically the "Paste from word cleaning fonts and sizes" button. It no longer opens a new window for me to paste anything into. Are there any fixes for this? Upgrading to a newer version of the control is not out of the question, but before I do that I was wondering how much has the control changed from the version I have as I'm wondering how much trouble I'm going to have implementing the new version. I know that's a hard question to answer but In general I guess I'm wondering how much has the core of the RadEditor changed. Just trying to figure out how easily I can swap out the old version for the new one

Any feedback would be greatly appreciated
Thanks
Todd
Rumen
Telerik team
 answered on 15 Oct 2010
2 answers
139 views

Hi,

i want to export radgrid into msword.
please let me know how to achieve this functionality.

thanks in advance.

bharat kumar
Top achievements
Rank 1
 answered on 15 Oct 2010
5 answers
134 views
Hi Support,

We are using SharePoint 2007 SP2 and RadEditor 5.8 with .NET 3.5 AJAX configured.

Imagine this site structure: our-company.com/knowledge/wiki
The User has read permissions on /knowledge and contribute on /knowledge/wiki. On both sites are publishing features activated.
We get an access denied when trying to upload a document to the wiki site via the document manager.
When granting the user contribute to /knowledge too it works fine.

Note: when uploading with the Image Manager to the same site and document library, it works even with the read permissions on /knowledge.

Regards
Ulf

Stanimir
Telerik team
 answered on 15 Oct 2010
1 answer
82 views
I believe my problem is with the firing of events for the grid, but I can't figure out how to make it work the way I need to.

I have a grid (grdDocumentList) with a download link for each row. Clicking on this link fires the ItemCommand event, where I build the path to the selection, stream the object to the user, then log this action in my database. I then need to fire a refresh on a different grid (grdMeetingList). I can't get the refresh to fire since the postback already occurred BEFORE the user got the file.

How do I get this first grid to refresh?

Example1.png shows my form and how it is supposed to work. The left grid shows all meetings, and the binding will display a yellow page icon if the user has documents remaining to download. They click View, the right grid rebinds, and as they click the Download link it should refresh the first grid. If they've downloaded all of the documents (whether it fails or not), the yellow page icon disappears. It's not firing due to the postback firing first.

Here's my code for the second grid:

Protected Sub grdDocumentList_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grdDocumentList.ItemCommand
 
    If e.CommandName = "Download" Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim FileName As String = item("FileDownload").Text
        Dim MeetingTopicSid As Integer = item("Meeting_TOPIC_SID").Text
 
        Dim TargetFile As String = FileName
        Dim file As System.IO.FileInfo = New System.IO.FileInfo(TargetFile) '-- if the file exists on the server
        If file.Exists Then 'set appropriate headers
            Dim liveStream As FileStream = New FileStream(TargetFile, FileMode.Open, FileAccess.Read)
            Dim buffer(CType(liveStream.Length, Integer)) As Byte
            liveStream.Read(buffer, 0, CType(liveStream.Length, Integer))
            liveStream.Close()
            Response.ClearHeaders()
            Response.ClearContent()
            Response.Clear()
            Response.ContentType = "application/octet-stream"
            Response.AddHeader("Content-Length", buffer.Length.ToString)
            Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name)
            Response.BinaryWrite(buffer)
 
            'Log User Download
            SqlHelper.ExecuteNonQuery(ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString, "usp_InsertMEETING_TOPIC_DOWNLOAD_LOG", Session.Item("gbUserSid"), MeetingTopicSid, DateTime.Now)
 
            'Rebind Grid
            Me.grdMeetingList.DataBind()
 
        End If
    End If
 
End Sub

Iana Tsolova
Telerik team
 answered on 15 Oct 2010
6 answers
121 views
Hi

I have a raddatepicker for a hotel booking form
however, i want the calendar to only show from today onwards (upto 1 year)

How would i acheive this?
thanks
Dimo
Telerik team
 answered on 15 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?