Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
165 views
I am trying to drag a "Status" column to the Grouping header and I get the Javascript error  below:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: <target>.Expense and <source>.Expense have conflicting properties: DataType property mismatch.

The Expense column is a Decimal column.  I entered all of the data so I know it is a number.  Some of the Expense values might be null, but that is it.  Any ideas?  Below is my grid HTML on the Aspx page.

thanks

mark

 <telerik:RadGrid ID="radGridProjects" Width="1400px" runat="server" AllowFilteringByColumn="True"
                            AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
                            ShowGroupPanel="True" PageSize="50" Skin="WebBlue"                   OnSelectedIndexChanged="radGridProjects_SelectedIndexChanged"
                            OnItemDataBound="radGridProjects_ItemDataBound" ShowFooter="True" 
                            OnNeedDataSource="radGridProjects_NeedDataSource" 
                            EnableLinqExpressions="False">
                            <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True">
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="380" />
                            </ClientSettings>
                            <MasterTableView ShowGroupFooter="true" >
                                <GroupByExpressions>
                                    <telerik:GridGroupByExpression>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldAlias="Team" FieldName="Team" SortOrder="Ascending"
                                                HeaderText="Team"></telerik:GridGroupByField>
                                        </SelectFields>
                                        <GroupByFields>
                                            <telerik:GridGroupByField FieldAlias="Team" FieldName="Team" SortOrder="Ascending"
                                                HeaderText="Team"></telerik:GridGroupByField>
                                        </GroupByFields>
                                    </telerik:GridGroupByExpression>
                                </GroupByExpressions>
                                <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                                <Columns>
                                    <telerik:GridButtonColumn CommandName="Select" DataTextField="Name" FilterControlAltText="Filter ProjectColumn column"
                                        SortExpression="Name" Text="Select" UniqueName="ProjectColumn" HeaderText="Project">
                                        <HeaderStyle Width="150px" />
                                        <ItemStyle Width="150px" VerticalAlign="Top" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridBoundColumn DataField="Category.Name" FilterControlAltText="Filter column1 column"
                                        HeaderText="Category" UniqueName="colCategory" SortExpression="Category.Name">
                                        <HeaderStyle Width="115px" />
                                        <ItemStyle Width="115px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Priority" FilterControlAltText="Filter column column"
                                        HeaderText="Priority" SortExpression="Priority" UniqueName="colPriority" FilterControlWidth="25px">
                                        <HeaderStyle Width="65px" />
                                        <ItemStyle Width="65px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="StartDate" DataFormatString="{0:d}" DataType="System.DateTime"
                                        FilterControlAltText="Filter column2 column" HeaderText="Start Date" UniqueName="colStartDate"
                                        FilterControlWidth="60px" SortExpression="StartDate">
                                        <HeaderStyle Width="100px" />
                                        <ItemStyle Width="100px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="EndDate" DataFormatString="{0:d}" FilterControlAltText="Filter column3 column"
                                        HeaderText="End Date" UniqueName="colEndDate" FilterControlWidth="60px" SortExpression="EndDate">
                                        <HeaderStyle Width="100px" />
                                        <ItemStyle Width="100px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ParStatus.Name" FilterControlAltText="Filter column4 column"
                                        HeaderText="Status" SortExpression="ParStatus.Name" UniqueName="colStatus">
                                        <HeaderStyle Width="115px" />
                                        <ItemStyle Width="115px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Team" FilterControlAltText="Filter column5 column"
                                        HeaderText="Team" SortExpression="Team" UniqueName="colTeam" FilterControlWidth="30px">
                                        <HeaderStyle Width="70px" />
                                        <ItemStyle Width="70px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ProjectManager" FilterControlAltText="Filter column6 column"
                                        HeaderText="PM" SortExpression="ProjectManager" UniqueName="colPM" FilterControlWidth="30px">
                                        <HeaderStyle Width="70px" />
                                        <ItemStyle Width="70px" VerticalAlign="Top" HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Resource" FilterControlAltText="Filter column7 column"
                                        HeaderText="Resources" SortExpression="Resource" UniqueName="colResource" 
                                        AllowFiltering="False">
                                        <HeaderStyle Width="125px" />
                                        <ItemStyle Width="125px" VerticalAlign="Top" HorizontalAlign="Left" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Expense" DataType="System.Int32" FilterControlAltText="Filter column8 column"
                                        HeaderText="Expense" SortExpression="Expense" UniqueName="colExpense" DataFormatString="{0:C0}"
                                        FilterControlWidth="50px" FooterText="Totals: " Aggregate="Sum">
                                        <HeaderStyle Width="90px" />
                                        <FooterStyle HorizontalAlign="Right" />
                                        <ItemStyle Width="90px" VerticalAlign="Top" HorizontalAlign="Right" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Capital" DataType="System.Int32" FilterControlAltText="Filter column9 column"
                                        HeaderText="Capital" SortExpression="Capital" UniqueName="colCapital" DataFormatString="{0:C0}"
                                        FilterControlWidth="50px" FooterText="$" Aggregate="Sum">
                                        <HeaderStyle Width="90px" />
                                        <FooterStyle HorizontalAlign="Right" />
                                        <ItemStyle Width="90px" VerticalAlign="Top" HorizontalAlign="Right" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Total" DataType="System.Int32" FilterControlAltText="Filter column10 column"
                                        HeaderText="Total" SortExpression="Total" UniqueName="colTotal" DataFormatString="{0:C0}"
                                        FilterControlWidth="50px" FooterText="$" Aggregate="Sum">
                                        <HeaderStyle Width="90px" />
                                        <FooterStyle HorizontalAlign="Right" />
                                        <ItemStyle Width="90px" VerticalAlign="Top" HorizontalAlign="Right" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Notes" FilterControlAltText="Filter column11 column"
                                        HeaderText="Notes" SortExpression="Notes" UniqueName="colNotes" 
                                        AllowFiltering="False">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Id" FilterControlAltText="Filter column12 column"
                                        UniqueName="colId" Visible="False">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="LastUpdate" DataFormatString="{0:d}" 
                                        FilterControlAltText="Filter column column" SortExpression="LastUdate" HeaderText="Updated" 
                                        UniqueName="colLastUpdate" FilterControlWidth="60px">
                                        <HeaderStyle Width="100px" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <EditFormSettings>
                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                    </EditColumn>
                                </EditFormSettings>
                            </MasterTableView>
                            <FilterMenu EnableImageSprites="False">
                            </FilterMenu>
                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                            </HeaderContextMenu>
                        </telerik:RadGrid>
mark baer
Top achievements
Rank 1
 answered on 23 Feb 2011
1 answer
64 views
Hi!  I'm receiving the following error when clicking on 'Table Wizard' in the RadEditor...

System.IO.FileLoadException: Could not load file or assembly 'Telerik.Web.UI, Version=2010.3.1215.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


This is the only place I receive the error even though we have Telerik controls embedded throughout our web application.  I have checked the web.config file and the Editor, Widgets, and Dialog namespaces all have "assembly="Telerik.Web.UI, Version=2010.3.1215.35..."

Could someone provide some suggestions as to reasons I am receiving this error and/or possible solutions?
Thanks!
Amy
Top achievements
Rank 1
 answered on 23 Feb 2011
2 answers
63 views
Hello,
   I'm using telerik ORM Open Access and telerik ASP.net AJAX web components. I want to setup a RadGrid to show hierarchy with two related entities of ORM Open Access.
    I was looking for in all the forum pages, in the blogs, in the documentation. All examples use tableDataSources populated from database directly. I was serching in the Open Access forum also.
   What I do is set in code behind the datasource of the RadGrid with a linq query from Open Access. Now, I want to set one entity like datasource of MasterGrid and a related Entity like datasource of NestedGrid. The relation is a "one to many" association managed by ORM Open Access Domain Model.

   Is there any way to do it?

Thanks in advance, and sorry for my English.
Tajes
Top achievements
Rank 1
 answered on 23 Feb 2011
0 answers
53 views
We have created a visual web part in SharePoint 2010 which contains then RadScheduler control.

We have bound the data to the scheduler through code using data table. (the list data is being retreived in a data table)

The problem is that the bound data does not display on then page.

The data tables bound to the scheduler (i.e. resource and appointments) belong to a single dataset.

Also, when we do a view source of the sharepoint page we can see our data loaded in javascript, but this data does not load on the page.

Any help in this regard will be highly appreciated.

Regards,

HM
Huzefa
Top achievements
Rank 1
 asked on 23 Feb 2011
7 answers
108 views
Hi,

I have a telerik:RadAsyncUpload in a page.  It worked using the Q1 dll's when I upgraded to Q2 for the multi upload I got a script error.

The error is: "Object doesn't support this property or method"

The error is in a JavaScript resource delivered by Telerik.Web.UI.WebResource.  The header comment is:
/* START Telerik.Web.UI.AsyncUpload.RadAsyncUpload.js */

In line :

w.setFileFilters([],k.get_multipleFileSelectionEnabled()

I'm using the .NET 4 dll's.

Any ideas where I can start looking to solve this?
Genady Sergeev
Telerik team
 answered on 23 Feb 2011
1 answer
177 views
I have attached a simple project that demonstrates the issue i am having. I want a user to be able to filter using the contains function by any columns with an enter key press (I have already done this thanks to a previous support ticket, thank you telerik support). However, now my issue is that i want the user to be able to filter using the equal to function on the enter key press for date columns which i have also been able to figure out how to do. My only issue is that when the user types in letters or an invalid date, the filter comes back with an invalid date error. I need it to validate the date before it filters the column so there cannot be an error. I noticed that if i type in an invalid date then actually go in and click equal to filter function then it will not filter until i have changed the date to a valid date and clicked the filter function again. I would like to achieve this same functionality but using the enter key press. Thank you.

Here is my source code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server"  />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="rlpProgress">
    <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grid2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grid3">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grid3" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grid4">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grid4" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    <telerik:RadAjaxLoadingPanel ID="rlpProgress" runat="server" Skin="Default" BackgroundPosition="Center"/>
 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="rmp1">
        <Tabs>
            <telerik:RadTab Text="tab 1" Value="1" PageViewID="rpv1" Selected="true"></telerik:RadTab>
            <telerik:RadTab Text="tab 2" Value="2" PageViewID="rpv2"></telerik:RadTab>
            <telerik:RadTab Text="tab 3" Value="3" PageViewID="rpv3"></telerik:RadTab>
            <telerik:RadTab Text="tab 4" Value="4" PageViewID="rpv4"></telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
     
     
    <telerik:RadMultiPage ID="rmp1" runat="server">
        <telerik:RadPageView ID="rpv1" runat="server" Selected="true">
        <h1>Grid 1</h1>
            <telerik:RadGrid ID="grid1" runat="server"
                AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True">
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID"
                    >
                    <CommandItemSettings ExportToPdfText="Export to Pdf" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                            SortExpression="ID" UniqueName="ID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Name"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Name column" HeaderText="Name"
                            SortExpression="Name" UniqueName="Name">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Address"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Address column" HeaderText="Address"
                            SortExpression="Address" UniqueName="Address">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="City"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter City column" HeaderText="City"
                            SortExpression="City" UniqueName="City">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="State"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter State column" HeaderText="State"
                            SortExpression="State" UniqueName="State">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ZipCode"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter ZipCode column" HeaderText="ZipCode"
                            SortExpression="ZipCode" UniqueName="ZipCode">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PhoneNo"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter PhoneNo column" HeaderText="PhoneNo"
                            SortExpression="PhoneNo" UniqueName="PhoneNo">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Email"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Email column" HeaderText="Email"
                            SortExpression="Email" UniqueName="Email">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Comments"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Comments column" HeaderText="Comments"
                            SortExpression="Comments" UniqueName="Comments">
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn DataField="DateEntered"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter DateEntered column" HeaderText="DateEntered"
                            ReadOnly="True" SortExpression="DateEntered" UniqueName="DateEntered" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                        </telerik:GridDateTimeColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <GroupingSettings CaseSensitive="false" />
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
        </telerik:RadPageView>
         
         
         
         
        <telerik:RadPageView ID="rpv2" runat="server">
            <h1>Grid 2</h1>
            <telerik:RadGrid ID="grid2" runat="server"
                AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True">
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID"
                    >
                    <CommandItemSettings ExportToPdfText="Export to Pdf" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                            SortExpression="ID" UniqueName="ID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Name"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Name column" HeaderText="Name"
                            SortExpression="Name" UniqueName="Name">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Address"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Address column" HeaderText="Address"
                            SortExpression="Address" UniqueName="Address">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="City"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter City column" HeaderText="City"
                            SortExpression="City" UniqueName="City">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="State"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter State column" HeaderText="State"
                            SortExpression="State" UniqueName="State">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ZipCode"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter ZipCode column" HeaderText="ZipCode"
                            SortExpression="ZipCode" UniqueName="ZipCode">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PhoneNo"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter PhoneNo column" HeaderText="PhoneNo"
                            SortExpression="PhoneNo" UniqueName="PhoneNo">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Email"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Email column" HeaderText="Email"
                            SortExpression="Email" UniqueName="Email">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Comments"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Comments column" HeaderText="Comments"
                            SortExpression="Comments" UniqueName="Comments">
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn DataField="DateEntered"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter DateEntered column" HeaderText="DateEntered"
                            ReadOnly="True" SortExpression="DateEntered" UniqueName="DateEntered" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                        </telerik:GridDateTimeColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <GroupingSettings CaseSensitive="false" />
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
        </telerik:RadPageView>
 
         
         
        <telerik:RadPageView ID="rpv3" runat="server">
           <h1>Grid 3</h1>
           <telerik:RadGrid ID="grid3" runat="server"
                AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True">
               <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
               </HeaderContextMenu>
               <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID"
                   >
                   <CommandItemSettings ExportToPdfText="Export to Pdf" />
                   <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                       <HeaderStyle Width="20px" />
                   </RowIndicatorColumn>
                   <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                       <HeaderStyle Width="20px" />
                   </ExpandCollapseColumn>
                   <Columns>
                       <telerik:GridBoundColumn DataField="ID" DataType="System.Int32"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                           SortExpression="ID" UniqueName="ID">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Name"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter Name column" HeaderText="Name"
                           SortExpression="Name" UniqueName="Name">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Address"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter Address column" HeaderText="Address"
                           SortExpression="Address" UniqueName="Address">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="City"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter City column" HeaderText="City"
                           SortExpression="City" UniqueName="City">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="State"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter State column" HeaderText="State"
                           SortExpression="State" UniqueName="State">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ZipCode"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter ZipCode column" HeaderText="ZipCode"
                           SortExpression="ZipCode" UniqueName="ZipCode">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="PhoneNo"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter PhoneNo column" HeaderText="PhoneNo"
                           SortExpression="PhoneNo" UniqueName="PhoneNo">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Email"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter Email column" HeaderText="Email"
                           SortExpression="Email" UniqueName="Email">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Comments"  FilterListOptions="VaryByDataType"
                           FilterControlAltText="Filter Comments column" HeaderText="Comments"
                           SortExpression="Comments" UniqueName="Comments">
                       </telerik:GridBoundColumn>
                       <telerik:GridDateTimeColumn DataField="DateEntered"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter DateEntered column" HeaderText="DateEntered"
                            ReadOnly="True" SortExpression="DateEntered" UniqueName="DateEntered" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                        </telerik:GridDateTimeColumn>
                   </Columns>
                   <EditFormSettings>
                       <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                       </EditColumn>
                   </EditFormSettings>
               </MasterTableView>
               <GroupingSettings CaseSensitive="false" />
               <FilterMenu EnableImageSprites="False">
               </FilterMenu>
            </telerik:RadGrid>
        </telerik:RadPageView>
 
         
         
        <telerik:RadPageView ID="rpv4" runat="server">
            <h1>Grid 4</h1>
            <telerik:RadGrid ID="grid4" runat="server" 
                AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True">
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID"
                    >
                    <CommandItemSettings ExportToPdfText="Export to Pdf" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                            SortExpression="ID" UniqueName="ID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Name"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Name column" HeaderText="Name"
                            SortExpression="Name" UniqueName="Name">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Address"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Address column" HeaderText="Address"
                            SortExpression="Address" UniqueName="Address">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="City"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter City column" HeaderText="City"
                            SortExpression="City" UniqueName="City">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="State"
                            FilterControlAltText="Filter State column" HeaderText="State"
                            SortExpression="State" UniqueName="State">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ZipCode"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter ZipCode column" HeaderText="ZipCode"
                            SortExpression="ZipCode" UniqueName="ZipCode">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PhoneNo"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter PhoneNo column" HeaderText="PhoneNo"
                            SortExpression="PhoneNo" UniqueName="PhoneNo">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Email"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Email column" HeaderText="Email"
                            SortExpression="Email" UniqueName="Email">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Comments"  FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter Comments column" HeaderText="Comments"
                            SortExpression="Comments" UniqueName="Comments">
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn DataField="DateEntered" FilterListOptions="VaryByDataType"
                            FilterControlAltText="Filter DateEntered column" HeaderText="DateEntered"
                            ReadOnly="True" SortExpression="DateEntered" UniqueName="DateEntered" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">
                        </telerik:GridDateTimeColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <GroupingSettings CaseSensitive="false" />
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
             
        </telerik:RadPageView>
    </telerik:RadMultiPage>
   
  
<telerik:RadButton ID="chkbox" runat="server" ButtonType="ToggleButton" Skin="Web20" Text="Checkbox" ToggleType="CheckBox" Font-Underline="false"></telerik:RadButton>
    
 
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript">
 
           function doFilter(sender, eventArgs, gvwName) {
               if ((eventArgs.keyCode == 13 || eventArgs.keyCode == 9) && (sender.value != "")) {
                   eventArgs.cancelBubble = true;
                   eventArgs.returnValue = false;
                   if (eventArgs.stopPropagation) {
                       eventArgs.stopPropagation();
                       eventArgs.preventDefault();
                   }
                   var masterTableView = $find(gvwName).get_masterTableView();
                   var index = sender.parentNode.cellIndex;
                   var columns = masterTableView.get_columns();
                   var uniqueName = columns[index].get_uniqueName();
                   var filterFunction = columns[index].get_filterFunction();
                   masterTableView.filter(uniqueName, sender.value, filterFunction);
               }
           }
 
           function doFilterDate(sender, eventArgs, gvwName, gvwColName) {
               if ((eventArgs.keyCode == 13 || eventArgs.keyCode == 9) && (sender.value != "")) {
                   eventArgs.cancelBubble = true;
                   eventArgs.returnValue = false;
                   if (eventArgs.stopPropagation) {
                       eventArgs.stopPropagation();
                       eventArgs.preventDefault();
                   }
                   var chkbox = $find('<%=chkbox.ClientID%>');
                   chkbox.focus();
                   var masterTableView = $find(gvwName).get_masterTableView();
                   masterTableView.filter(gvwColName, sender.value, Telerik.Web.UI.GridFilterFunction.EqualTo);
                   this.focus();
               }
           }
            
           function FilterChanged(sender, eventArgs, gvwName) {
            
               var active = document.activeElement;
                
              if (sender.value == "") {
                   eventArgs.cancelBubble = true;
                   eventArgs.returnValue = false;
                   if (eventArgs.stopPropagation) {
                       eventArgs.stopPropagation();
                       eventArgs.preventDefault();
                   }
                   var masterTableView = $find(gvwName).get_masterTableView();
                    
                   var index = sender.parentNode.cellIndex;
                   var columns = masterTableView.get_columns();
                   var uniqueName = columns[index].get_uniqueName();
                   masterTableView.filter(uniqueName, sender.value, Telerik.Web.UI.GridFilterFunction.NoFilter);
               }
           }
 
           function FilterChangedDate(sender, eventArgs, gvwName, gvwColName) {
 
               var active = document.activeElement;
 
               if (sender.value == "") {
                   eventArgs.cancelBubble = true;
                   eventArgs.returnValue = false;
                   if (eventArgs.stopPropagation) {
                       eventArgs.stopPropagation();
                       eventArgs.preventDefault();
                   }
                   var masterTableView = $find(gvwName).get_masterTableView();
                   masterTableView.filter(gvwColName, sender.value, Telerik.Web.UI.GridFilterFunction.NoFilter);
               }
           }
        </script>
</telerik:RadCodeBlock>              
                 
    </form>
</body>
</html>
Imports Telerik.Web.UI
Imports Telerik.Web
Imports System.Data.OleDb
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.Sql
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
    Public dbConn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("~/app_data/RadGridFilteringIssue.mdb") & ";User Id=admin;Password=;")
    Public strSQL As String = "SELECT People.ID, People.Name, People.Address, People.City, People.State, People.ZipCode, People.PhoneNo, People.Email, People.Comments, Date As DateEntered FROM People"
 
    Public Sub AddFilterOnKey(ByVal gvwName As String, ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)
        Dim gvw As RadGrid = DirectCast(rmp1.FindControl(gvwName), RadGrid)
        Dim ctrl As Control
        If TypeOf e.Item Is GridFilteringItem Then
            Dim fltItem As GridFilteringItem = TryCast(e.Item, GridFilteringItem)
            For Each column As GridColumn In gvw.Columns
                column.CurrentFilterFunction = GridKnownFunction.Contains
                ctrl = fltItem(column.UniqueName).Controls(0)
                If TypeOf ctrl Is TextBox Then
                    Dim box As TextBox = TryCast(ctrl, TextBox)
                    box.Attributes.Add("onkeydown", "doFilter(this,event,'" & gvw.ClientID & "')")
                    box.Attributes.Add("onchange", "FilterChanged(this,event,'" & gvw.ClientID & "')")
                ElseIf TypeOf ctrl Is RadDatePicker Then
                    Dim datepick As RadDatePicker = TryCast(ctrl, RadDatePicker)
                    Dim dateinput As RadDateInput = TryCast(datepick.DateInput, RadDateInput)
                    dateinput.Attributes.Add("onkeypress", "doFilterDate(this,event,'" & gvw.ClientID & "','" & column.UniqueName & "')")
                    dateinput.Attributes.Add("onchange", "FilterChangedDate(this,event,'" & gvw.ClientID & "','" & column.UniqueName & "')")
                End If
            Next
        End If
    End Sub
 
    Protected Sub grid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grid1.ItemCreated
        For Each column As GridColumn In grid1.Columns
            If column.CurrentFilterFunction = GridKnownFunction.NoFilter Then
                If Not column.UniqueName = "Delete" Then
                    column.CurrentFilterFunction = GridKnownFunction.Contains
                End If
            End If
        Next
        AddFilterOnKey("grid1", sender, e)
    End Sub
 
    Protected Sub grid2_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grid2.ItemCreated
        For Each column As GridColumn In grid2.Columns
            If column.CurrentFilterFunction = GridKnownFunction.NoFilter Then
                If Not column.UniqueName = "Delete" Then
                    column.CurrentFilterFunction = GridKnownFunction.Contains
                End If
            End If
        Next
        AddFilterOnKey("grid2", sender, e)
    End Sub
 
 
    Protected Sub grid3_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grid3.ItemCreated
        For Each column As GridColumn In grid3.Columns
            If column.CurrentFilterFunction = GridKnownFunction.NoFilter Then
                If Not column.UniqueName = "Delete" Then
                    column.CurrentFilterFunction = GridKnownFunction.Contains
                End If
            End If
        Next
        AddFilterOnKey("grid3", sender, e)
    End Sub
 
    Protected Sub grid4_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grid4.ItemCreated
        For Each column As GridColumn In grid4.Columns
            If column.CurrentFilterFunction = GridKnownFunction.NoFilter Then
                If Not column.UniqueName = "Delete" Then
                    column.CurrentFilterFunction = GridKnownFunction.Contains
                End If
            End If
        Next
        AddFilterOnKey("grid4", sender, e)
    End Sub
 
    Protected Sub grid1_SortCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles grid1.SortCommand
        DataBindGrid("grid1")
    End Sub
 
    Protected Sub grid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grid1.ItemCommand
        If e.CommandName = RadGrid.FilterCommandName Then
            DataBindGrid("grid1")
        End If
    End Sub
 
    Protected Sub grid2_SortCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles grid2.SortCommand
        DataBindGrid("grid2")
    End Sub
 
    Protected Sub grid2_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grid2.ItemCommand
        If e.CommandName = RadGrid.FilterCommandName Then
            DataBindGrid("grid2")
        End If
    End Sub
 
    Protected Sub grid3_SortCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles grid3.SortCommand
        DataBindGrid("grid3")
    End Sub
 
    Protected Sub grid3_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grid3.ItemCommand
        If e.CommandName = RadGrid.FilterCommandName Then
            DataBindGrid("grid3")
        End If
    End Sub
 
    Protected Sub grid4_SortCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles grid4.SortCommand
        DataBindGrid("grid4")
    End Sub
 
    Protected Sub grid4_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grid4.ItemCommand
        If e.CommandName = RadGrid.FilterCommandName Then
            DataBindGrid("grid4")
        End If
    End Sub
 
    Public Sub DataBindGrid(ByVal gvwName As String)
        Dim gvw As RadGrid = DirectCast(rmp1.FindControl(gvwName), RadGrid)
 
        Dim reader As OleDbDataReader
        Dim cmd As New OleDbCommand(strSQL, dbConn)
 
        Dim dt As New DataTable
        dbConn.Open()
        Try
            reader = cmd.ExecuteReader
            If reader.HasRows Then
                dt.Load(reader)
            End If
        Catch ex As Exception
        Finally
            If Not dbConn Is Nothing Then dbConn.Close()
        End Try
 
        gvw.DataSource = dt
        gvw.DataBind()
    End Sub
 
    Public Sub GetDataSource(ByVal gvwName As String)
        Dim gvw As RadGrid = DirectCast(rmp1.FindControl(gvwName), RadGrid)
 
        Dim reader As OleDbDataReader
        Dim cmd As New OleDbCommand(strSQL, dbConn)
 
        Dim dt As New DataTable
        dbConn.Open()
        Try
            reader = cmd.ExecuteReader
            If reader.HasRows Then
                dt.Load(reader)
            End If
        Catch ex As Exception
        Finally
            If Not dbConn Is Nothing Then dbConn.Close()
        End Try
 
        gvw.DataSource = dt
    End Sub
 
    Protected Sub grid4_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grid4.NeedDataSource
        GetDataSource("grid4")
    End Sub
 
    Protected Sub grid3_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grid3.NeedDataSource
        GetDataSource("grid3")
    End Sub
 
 
    Protected Sub grid2_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grid2.NeedDataSource
        GetDataSource("grid2")
    End Sub
 
    Protected Sub grid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grid1.NeedDataSource
        GetDataSource("grid1")
    End Sub
End Class
Mira
Telerik team
 answered on 23 Feb 2011
2 answers
68 views
Hi, I'm having trouble with a FileExplorer inside a MultiPage control. This is my markup code:
 
       <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" AutoPostBack="True">
            <Tabs>
                <telerik:RadTab PageViewID="RadPageView1" Text="1" Selected="true">
                </telerik:RadTab>
                <telerik:RadTab PageViewID="RadPageView2" Text="2">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" RenderSelectedPageOnly="True">
            <telerik:RadPageView ID="RadPageView1" runat="server" Selected="true">
                <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Configuration-ViewPaths="/">
                </telerik:RadFileExplorer>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView2" runat="server">
                2
            </telerik:RadPageView>
        </telerik:RadMultiPage>

At the beginning everything seems fine, I can navigate the folder as shown in the attachment 1.jpg.
But if I change the selected tab and then return to the FileExplorer tab, the FileExplorer Tree loses its state as shown in the attachment 2.jpg. The FileExplorer Grid mantains the selected folder, but de Tree collapses to its original state and loses the selected folder.

I found a similar issue in the forums: http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/control-gets-malformed-when-inside-radpageview-with-renderselectedpageonly-set.aspx. But it doesn't provide a solution.

BTW, I'm using Q1 2010.

Greetings,
Santiago.
Santiago
Top achievements
Rank 1
 answered on 23 Feb 2011
1 answer
78 views
hi,
I would like to enable my webapplication to drag items from a grid control to the treeview control.
I read posts from 2005 explaning this is not avialble...
I also read to post with this zip:
  • DragAndDropBetweenRadGridAndRadTreeView.zip
  •  

    which by pass this problem but this doesn't help much...

    is there any news on enabling Drop from grid to treeview?
    tnx
    leeoz

    Pavlina
    Telerik team
     answered on 23 Feb 2011
    1 answer
    108 views
    All:

    I have read a few threads on this, but the provided solutions aren't doing the trick for me.

    I have a scheduler that runs from 8AM to 8PM, split by 10 minute increments, so the calender gets fairly long. My client doesn't like the scroll format, they prefer the whole page format, but the delete box when deleting an appointment appears way up the list when they're near the bottom.

    I have made the code so that the calender gets shorter (now minus 1 hour is the start time), but it's still sometimes an issue.

    Is there a solution on the horizon that will allow the delete box to appear closer to where the user clicked the deleted appointment?

    My other thought was creating a whole new delete confirmation page that accepts a parameter, IE, delete_appointment.aspx?id=foo.

    The only problem I see with that, is that if you are trying to delete a single occurrence of an appointment in a recurring chain, it doesn't yet have an ID#.

    Can you offer any ideas/solutions per above?

    Thanks
    Mitch
    Mitchell
    Top achievements
    Rank 1
     answered on 23 Feb 2011
    1 answer
    190 views
    i'm new to the ajaxmanager and i'm doing a test but its not working.
    in the ddl event i'm changing the text value of TextBox1
    what am i doing wrong?
    i checked to see if thats the only ajaxmanager on page and it is.
    i have the scriptmanager on page also.

       
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>        
                <telerik:AjaxSetting AjaxControlID="DropDownList1">            
                    <UpdatedControls>                                    
                        <telerik:AjaxUpdatedControl 
                            ControlID="divTest">
                        </telerik:AjaxUpdatedControl>                   
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
      
    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
        <asp:ListItem> test1</asp:ListItem>
        <asp:ListItem> test2</asp:ListItem>
        <asp:ListItem> test3</asp:ListItem>
    </asp:DropDownList>
      
    <br /> <br /> <br />
      
    <div style="border:solid 1px red; height:300px;" id="divTest" runat="server">
      <asp:Panel ID="panelTest" runat="server">    
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
      </asp:Panel>    
    </div>
    Pavlina
    Telerik team
     answered on 23 Feb 2011
    Narrow your results
    Selected tags
    Tags
    +? more
    Top users last month
    Will
    Top achievements
    Rank 2
    Iron
    Motti
    Top achievements
    Rank 1
    Iron
    Hester
    Top achievements
    Rank 1
    Iron
    Bob
    Top achievements
    Rank 3
    Iron
    Iron
    Veteran
    Thomas
    Top achievements
    Rank 2
    Iron
    Want to show your ninja superpower to fellow developers?
    Top users last month
    Will
    Top achievements
    Rank 2
    Iron
    Motti
    Top achievements
    Rank 1
    Iron
    Hester
    Top achievements
    Rank 1
    Iron
    Bob
    Top achievements
    Rank 3
    Iron
    Iron
    Veteran
    Thomas
    Top achievements
    Rank 2
    Iron
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?