Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
66 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
59 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
127 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
182 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
73 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
81 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
    114 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
    196 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
    1 answer
    57 views
    I have a problem with Editor in IE.

    The editor propery enable is set to "False". When I set it to "True" in codebehind, the first render of the Editor far exceeds the size set for this control (445 pixels). If I disable and enable again, the look is fine.

    Here is the screenshot for the first loading and subsequent loading.

    I'm using RadControls for ASP.NET AJAX Q2 2009 SP1

    Have you any idea what can cause this bug?
    Thank you in advance
    Rumen
    Telerik team
     answered on 23 Feb 2011
    2 answers
    79 views

    Hi,

    I have 3 tabs.  The first 2 tabs take user input, and the final third tab displays a calcution according to the previous 2 tabs' data.  I am using the OnTabClick event to check which tab the user has clicked, and if it happens to be the third then we process the users input and display the final calculation (this takes a bit of time since we are hitting the database).  The tab strip is ajaxified and displays my LoadingPanel when the OnTabClick event is fired.  It works great but the only issue is that the LoadingPanel also displays for the other tab clicks, where no data is needed to be calculated.  Is there a way to only display the LoadingPanel for a specific TabClick instead of all tabs where some are not needed to perform calculations but others are?

    My ajax manager proxy is setup as such (which causes all tabs to display the LoadingPanel):

    <rad:RadAjaxManagerProxy runat="server">
        <AjaxSettings>
            <rad:AjaxSetting AjaxControlID="UniverseTab">
                <UpdatedControls >
                    <rad:AjaxUpdatedControl ControlID="UniverseTab" />
                    <rad:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel" />
                </UpdatedControls>
            </rad:AjaxSetting>
        </AjaxSettings>
        <AjaxSettings>
            <rad:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </rad:AjaxSetting>
        </AjaxSettings>
    </rad:RadAjaxManagerProxy>

    Thanks,
    Patrick

    Patrick
    Top achievements
    Rank 1
     answered on 23 Feb 2011
    Narrow your results
    Selected tags
    Tags
    +? more
    Top users last month
    Rob
    Top achievements
    Rank 3
    Bronze
    Iron
    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
    Iron
    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?