Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
310 views
Hi Team,

          I'm facing unknow error after OnAjaxRequest trigger.
Error is : 126|updatePanel|ctl00_ContentPlaceHolder1_Lines_C__radGrid_ctl00_ctl05_EditFormControl__radAjManagersSU||
At my page i didn't use asp:UpdatePanel, why i saw this error.

           Please help to me.

Here is code.

<telerik:RadScriptBlock ID="radScriptBlock" runat="server">
    <script type="text/javascript" language="javascript">
        var clickCalledAfterRadconfirm = false;
        var lastClickedItem = null;
        var isrespond = false;
        var respondmsg = null;
        /*  Rad Window Start  */
        function openWins(url, winid, para, width, height) {
            var _contparameter = '';
            var _controlfill = $get('<%= this._hidField.ClientID%>');
            _controlfill.value = '';
            switch (para.toLowerCase()) {
                case "item_ln":
                case "lookup_resource_group_hdr":
                    _contparameter = "&_qReturnto=" + para;
                    break;
                default:
            }
            var oWnd = $find("<%=_radWinManagers.ClientID %>").open(url + _contparameter, winid);
            setBehaviors(oWnd);
            oWnd.SetSize(width, height);
            oWnd.SetModal(true);
        }
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function setBehaviors(oWnd) {
            oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Pin + Telerik.Web.UI.WindowBehaviors.Reload + Telerik.Web.UI.WindowBehaviors.Close);
        }
        function Usc_OnClientClose(oWnd, args) {
            //get the transferred arguments           
            var arg = args.get_argument();
            if (arg) {
                var vals = arg.vals;
                var cmds = arg.cmds;
                var valext = arg.valext;
                var _controlfill = $get('<%= this._hidField.ClientID%>');
                _controlfill.value = '';
                _controlfill.value = vals;
 
                var ajaxManager = $find("<%= _radAjManagers.ClientID %>");
                if ((ajaxManager == null) || (ajaxManager == undefined))
                    return false;
                if (_controlfill) {
                    switch (cmds.toLowerCase()) {
                        case 'lookup_item_hdr': break;
                        case 'lookup_gl_hdr':
                        case 'lookup_item_ln':
                        case 'lookup_resource_group_hdr':
                            ajaxManager.ajaxRequest(cmds);
                            break;
                        default: break;
                    }
                }
            }
            return false;
        }
        /*  Rad Window End  */       
    </script>
</telerik:RadScriptBlock>
<telerik:RadWindowManager ID="_radWinManagers" ShowContentDuringLoad="true" VisibleStatusbar="false"
    ReloadOnShow="false" runat="server" Skin="Default" EnableShadow="true">
    <Windows>
        <telerik:RadWindow ID="_radWinItems" runat="server" Behaviors="Pin,reload,close,move"
            OnClientClose="Usc_OnClientClose">
        </telerik:RadWindow>
        <telerik:RadWindow ID="_radDialog" runat="server" Behaviors="Pin,reload,close,move"
            OnClientClose="Usc_OnClientClose">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
<telerik:RadAjaxManager ID="_radAjManagers" runat="server" OnAjaxRequest="_radAjManager_AjaxRequest">
    <AjaxSettings>                      
    </AjaxSettings>
</telerik:RadAjaxManager>

Code

#region "RadControl"
 
    protected void _radAjManager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        switch (e.Argument)
        {
            case "lookup_item_ln":
            case "lookup_resource_group_hdr":
                GetItemInfo();
                break;           
            default: break;
        }
    }
 
#endregion

Regards
Alex.
Maria Ilieva
Telerik team
 answered on 15 May 2012
7 answers
144 views
Hi,

Is there a way to display an 'all day' row in the timeline view, similar to week view. Our timeline view is showing a day per column and we like the use of the all day row to place notes relevant for the whole days, on the top. Do you have other suggestions for displaying multi-day notes?

Thanks,
Wen
Peter
Telerik team
 answered on 15 May 2012
3 answers
197 views
In this project we have a rotator that should load items as needed, so we created a web service to do just that. In your example, you use a WCF web-service. After trying that unsuccessfully we switched over and tried creating an asmx web service. We are getting the following error:

RadRotator items request failed:
Exception = Invalid web service call, missing value for parameter: 'index'.

Any assistance in getting past this would be great! 

Here is the code for the rotator:

<telerik:RadRotator ID="ItemRotator" runat="server" Width="100%" Height="500px" CssClass="horizontalRotator"
    ScrollDuration="500" FrameDuration="1" ItemHeight="200" ItemWidth="230" RotatorType="ButtonsOver"
    WrapFrames="false"  >
      <WebServiceSettings Path="~/Services/Assessment.asmx" Method="LoadAssessmentItemThumbnails"/>
</telerik:RadRotator>

And the web service:


using System;
using System.Collections.Generic;
using System.Web.Services;
using Telerik.Web.UI;
using Thinkgate.Base.Classes;
 
namespace Thinkgate.Services
{
    /// <summary>
    /// Summary description for Assessment1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    [System.Web.Script.Services.ScriptService]
    public class Assessment1 : System.Web.Services.WebService
    {
        [WebMethod(true)]
        [System.Web.Script.Services.ScriptMethod]
        public RadRotatorItemData[] LoadAssessmentItemThumbnails(int index = 0, string argument = "")
        {
            List<RadRotatorItemData> result = new List<RadRotatorItemData>();
 
            List<AssessmentItem> itemList = AssessmentItem.GetIncrementedAssessmentItemsByGradeSubjectCourse("01", "Mathematics", "Mathematics", index, index + 10);
 
            foreach (AssessmentItem item in itemList)
            {
                var rotatorItemData = new RadRotatorItemData();
 
                rotatorItemData.Html = @"<div style='position: relative; background-color: green'>"
                                     + @"<input style='position: absolute; top: 0px' type='checkbox'/>"
                                     + @"<img style='position: absolute; top: 0px; left: 30px;' "
                                     + @"src='/Thumbnails/thumb_item_" + item.ID + ".png' "
                                     + @"alt='Item Thumbnail' onerror='onImgError(this);' onLoad='setDefaultImage(this);' /></div>";
 
                result.Add(rotatorItemData);
            }
 
            return result.ToArray();
 
        }
    }
}


If we need to switch back to an svc web service please help us to set this up in the web.config as that was also an issue. 

In addition, can the html be loaded into rad docks on item data bound?


Thanks in advance,
Steven
Slav
Telerik team
 answered on 15 May 2012
5 answers
132 views
  • I am using MS Visual Studio 2010 in a 3.5 environment.
  • I am using Microsoft Vista (32 bit)
  • The database is currently located on an SQL 2005 server.
  • I am using RadGrid & tools, version 2012.1.411.35
  • I am using both Chrome (18.0.1025.168) and Internet Explorer (8.0.7600.16385)
  • I am programming in VB.net

I'll preface this with the fact that I don't really know anything about LinqToSql.  I am trying to follow instructions online, but most always assume the reader knows more than I do.

I have an SQL database of 215,000 records that I loaded in a RadGrid with an ASP SqlDataSource.  This was slow to load, filter, sort, and go to the next or previous page.

I came across the article Grid / 300 000 Rows with LINQ and tried to implement this and eventually I did.  The data loads and I can do everything I did in the original setup.  It is still slow except for filtering which is pretty quick.  Nothing works fast like the demo on the page I linked above.

Also, the code sets the TotalRowCount to 300000, so even if it's filtered to 10 items, there are still loads of pages to page through which is odd.

I also attempted to apply the solutions located here Grid / Custom Paging, but again, it assumes the reader knows more than I do.  It also uses demo files and whatnot, so I've been unable to get it working for me.


Basically, I want to speed this up.  I'd like to get the LinqToSQL working properly.



The HTML for my page is:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
<br />
 
<telerik:RadGrid ID="RadGrid1"
    AutoGenerateColumns="False" runat="server" DataSourceID="LinqDataSource1" AllowFilteringByColumn="True"
    AllowPaging="True" AllowSorting="True" ShowGroupPanel="True"
    CellSpacing="0" GridLines="None">
    <PagerStyle Mode="NextPrevAndNumeric" />
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView TableLayout="Fixed">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
 
            <Columns>
                <telerik:GridBoundColumn DataField="FilePath"
                    FilterControlAltText="Filter FilePath column" HeaderText="FilePath"
                    ReadOnly="True" SortExpression="FilePath" UniqueName="FilePath">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ProjectID"
                    FilterControlAltText="Filter ProjectID column" HeaderText="ProjectID"
                    ReadOnly="True" SortExpression="ProjectID" UniqueName="ProjectID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Category"
                    FilterControlAltText="Filter Category column" HeaderText="Category"
                    ReadOnly="True" SortExpression="Category" UniqueName="Category">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ProjectName"
                    FilterControlAltText="Filter ProjectName column" HeaderText="ProjectName"
                    ReadOnly="True" SortExpression="ProjectName" UniqueName="ProjectName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ProjCoreTitle"
                    FilterControlAltText="Filter ProjCoreTitle column" HeaderText="ProjCoreTitle"
                    ReadOnly="True" SortExpression="ProjCoreTitle" UniqueName="ProjCoreTitle">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DrawingNumber"
                    FilterControlAltText="Filter DrawingNumber column" HeaderText="DrawingNumber"
                    ReadOnly="True" SortExpression="DrawingNumber" UniqueName="DrawingNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DrawingTitle"
                    FilterControlAltText="Filter DrawingTitle column" HeaderText="DrawingTitle"
                    ReadOnly="True" SortExpression="DrawingTitle" UniqueName="DrawingTitle">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Description"
                    FilterControlAltText="Filter Description column" HeaderText="Description"
                    ReadOnly="True" SortExpression="Description" UniqueName="Description">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DrawingDate" DataType="System.DateTime"
                    FilterControlAltText="Filter DrawingDate column" HeaderText="DrawingDate"
                    ReadOnly="True" SortExpression="DrawingDate" UniqueName="DrawingDate">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="RecordCreated" DataType="System.DateTime"
                    FilterControlAltText="Filter RecordCreated column" HeaderText="RecordCreated"
                    ReadOnly="True" SortExpression="RecordCreated" UniqueName="RecordCreated">
                </telerik:GridBoundColumn>
            </Columns>
 
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="true"></ClientSettings>
    <FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
 
<asp:LinqDataSource ID="LinqDataSource1"
    AutoPage="False" runat="server" ContextTypeName="ScanBrowser.ScanBrowserContext.ScanBrowserContext"
    TableName="BrowserGridTBL" 
    Select="new (FilePath, ProjectID, Category, ProjectName, ProjCoreTitle, DrawingNumber, DrawingTitle, Description, DrawingDate, RecordCreated)">
</asp:LinqDataSource>


And the VB code behind that:
Imports Telerik.Web.UI
Imports System.Linq
Imports System.Diagnostics
Public Class WebForm2
    Inherits System.Web.UI.Page
 
    Protected Sub LinqDataSource1_Selected(sender As Object, e As System.Web.UI.WebControls.LinqDataSourceStatusEventArgs) Handles LinqDataSource1.Selected
 
        If Not Cache("MyData") Is Nothing AndAlso Not e.Result Is Nothing Then
            Cache("MyData") = e.Result
        End If
 
    End Sub
 
    Protected Sub LinqDataSource1_Selecting(sender As Object, e As System.Web.UI.WebControls.LinqDataSourceSelectEventArgs) Handles LinqDataSource1.Selecting
 
        e.Arguments.TotalRowCount = 300000
 
        If Not Cache("MyData") Is Nothing Then
            e.Result = Cache("MyData")
        End If
 
    End Sub
 
    Protected Sub RadAjaxManager1_AjaxSettingCreating(sender As Object, e As Telerik.Web.UI.AjaxSettingCreatingEventArgs) Handles RadAjaxManager1.AjaxSettingCreating
 
        If Not e.Updated Is RadGrid1 Then
            e.UpdatePanel.RenderMode = UpdatePanelRenderMode.Inline
        End If
 
    End Sub
     
End Class

Thank you for your assistance,

Rick


PS - Please have patience.  You may need to step me through some of the stuff that may be simple to you.  :)
Tsvetoslav
Telerik team
 answered on 15 May 2012
3 answers
114 views
I want to localize scheduler for Persian or Arabic Calendar. Has anyone any idea?
Peter
Telerik team
 answered on 15 May 2012
3 answers
72 views
Hi everybody,

Iam starting this thread cause I couldnt find any answer to my problem in Google or this forum or somewhere else.
description:
I have got 3 Grids on my Page and want to drag a Item from Grid A and drop it on Grid B:
Grid A: source of drag
Grid B: target of drop
Grid C: test target of drop

My Grid C is an empty Grid without any special settings. Grid A is my source where I have some contact items listed. Grid B is wrapped into a telerik:RadAjaxPanel.
If I drag an item from Grid A and drop it on Grid C the eventargs in the codebehind in OnRowDrop looks like this:
? e
{Telerik.Web.UI.GridDragDropEventArgs}
    base {System.EventArgs}: {Telerik.Web.UI.GridDragDropEventArgs}
    DestDataItem: {Telerik.Web.UI.GridDataItem}
    DestinationGrid: {DotNetNuke.Web.UI.WebControls.DnnGrid}
    DestinationTableView: {Telerik.Web.UI.GridTableView}
    DraggedItems: Count = 1
    DropPosition: Above
    HtmlElement: ""

If I drag an item from Grid A and drop it on Grid B the eventargs looking like:
? e
{Telerik.Web.UI.GridDragDropEventArgs}
    base {System.EventArgs}: {Telerik.Web.UI.GridDragDropEventArgs}
    DestDataItem: null
    DestinationGrid: null
    DestinationTableView: null
    DraggedItems: Count = 1
    DropPosition: Above
    HtmlElement: "undefined"

This is only caused by the telerik:RadAjaxPanel if I remove the ajaxpanel it will work like in the first drag drop.
I alrdy read documentations here on telerik.com and looked into demos but couldnt find any answer to my problem.
I thought something about using the OnDragging method on client side to determine if the destination is wrapped by a telerik:RadAjaxPanel and react on this. For example setting the eventarg properties and filling it with the correct data on client side. (But this is just a guess I couldnt get it working)

It would be awesome if someone could help me with this problem.

best regards, noone.
Daniel
Telerik team
 answered on 15 May 2012
1 answer
62 views
Hi,

I am using a Rad Shared Calendar in edit item template of a Rad Grid. I have implemented the solution exactly like you have shown it in your demo, with the same textbox and javascript. It is showing the correct selected value, but in Updated event of RadGrid it is always giving the me old value of textbox. Can you tell me how to get the new selected value in code behind from the text box?
Bhupinder Singh
Top achievements
Rank 1
 answered on 15 May 2012
4 answers
194 views
HI,

I have a Grid in a RadWindow. This grid has a RadDatePicker control in EditItemTemplate. The calendar is not shown when I click on the datepicker control. 


                               
<telerik:RadWindowManager ID="RadWindowManagerActuals" ShowContentDuringLoad="true" VisibleStatusbar="true" width="820px" Height="800px"
                                  ReloadOnShow="true" runat="server" Skin="Default" EnableShadow="false">
          <Windows>
          <telerik:RadWindow ID="RadShowActuals" runat="server" Behaviors="Close" Modal="true"  >
      <ContentTemplate>               
            <telerik:RadGrid ID="GrdMeasureActuals" AutoGenerateColumns="False" AllowPaging="True" GridLines="Both" CellPadding="2"
                  AllowSorting="True" runat="server"  OnNeedDataSource="GrdMeasureActuals_NeedDataSource" OnUpdateCommand="GrdMeasureActuals_UpdateCommand"
                  OnItemCommand="GrdMeasureActuals_ItemCommand" OnItemDataBound="GrdMeasureActuals_ItemDataBound"
                   Width="780px">
                  <PagerStyle Mode="NextPrev" />
                  <GroupingSettings CaseSensitive="false" />
                  <MasterTableView TableLayout="Fixed" PageSize="300" DataKeyNames="ID">
                      <Columns>
                          <telerik:GridButtonColumn FooterText="Edit" DataTextFormatString="Edit" ButtonType="ImageButton"
                              UniqueName="Edit" HeaderText="Edit" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                              CommandName="Edit" DataTextField="ID" ImageUrl="~/_layouts/images/edit.gif"
                              HeaderStyle-Width="25px">
                          </telerik:GridButtonColumn>                       
                           <telerik:GridTemplateColumn HeaderText="Actual Value Date" SortExpression="ActualValueDate" HeaderStyle-Width="60px" >
                              <ItemTemplate>
                                 <asp:Label Id="LblActualValueDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"ActualValueDateString")%>' />
                              </ItemTemplate>
                              <EditItemTemplate>
                                     <telerik:RadDatePicker ID="DatActualValueDate" runat="server" Width="140px" Enabled="true"
                              AutoPostBack="false" DateInput-EmptyMessage="" MinDate="01/01/2010" MaxDate="01/01/2100" Culture='<%# preferredCulture %>' >
                               
                                      <Calendar runat="server">
                                          <SpecialDays>
                                              <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                          </SpecialDays>
                                      </Calendar>
                                  </telerik:RadDatePicker>
                                   <asp:Label runat="server" ForeColor="red" Id="LblErrorActualValueDate" />
                              </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                                 </Columns>
                  </MasterTableView>
              </telerik:RadGrid>
             <br />
            
             
         </ContentTemplate>
          </telerik:RadWindow>
         
      </Windows>
  </telerik:RadWindowManager>
 

Bhupinder Singh
Top achievements
Rank 1
 answered on 15 May 2012
0 answers
94 views


Hi ,

This is Rathan am Using the telerik menu control its working in localsystem. But when i published in server styles not working .Please let me know.


Thank you in Advance.



Rathan
Top achievements
Rank 1
 asked on 15 May 2012
1 answer
114 views
I want to Implement File Explore from custom content provide . my provider us database table. how can in implement this .
Dobromir
Telerik team
 answered on 15 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?