Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
112 views

Hi

I have a page with a timer, a grid and a quite complex scheduler. The trigger checks for new records in a database table and refreshes/rebinds the grid if new information is available.

Every time the timer triggers, memory consumption goes up about 15-20MB for a RadScheduler with about 150-200 appointments, about 3-4 MB for about 20 appointments (no rebinding of scheduler). After a few hours memory consumption of the page in Chrome is almost at 2GB and the page is unusable. Only restarting the browser helps fixing the issue.

 

This happens also when Timer is off and I navigate back and forth in the RadScheduler in WeekView. This time the scheduler is rebinding, of course.

Any hints where I could look for ewithout having to post the code? Or any example with timers and RadScheduler?

 

Thank you very much...

 

rugydp
Top achievements
Rank 1
 answered on 03 Aug 2017
6 answers
118 views

hi,

i have a GridTemplateColumn in Radgrid.  In  the  <EditItemTemplate> i have a radcombo. When fire the event  radcombo1_SelectedIndexChanged

i need to access to another GridTemplateColumn like this:

                   <telerik:GridTemplateColumn HeaderText="Annul."  UniqueName="flg_ann">
                           <ItemTemplate>
                               <asp:CheckBox id="CheckBoxFlgAnnul" runat="server" Checked='<%# Eval("flg_ann") %>'></asp:CheckBox>
                           </ItemTemplate>
                    </telerik:GridTemplateColumn>

........rcbStatoRecUpd_SelectedIndexChanged(.......)

        Dim radcombo  As RadComboBox = CType(sender, RadComboBox)
        Dim editedItem As GridEditableItem = TryCast(radcombo.NamingContainer, GridEditableItem)

 Those firsts two line of code work well BUT after no way to access to CheckBox column. i try findcontrol in all possible way but i got alway error "object no reference" ecc ecc I also try Dim item As GridDataItem = DirectCast(combo.NamingContainer, GridDataItem) but nothing to do. no way.

       Question : there is a way to access to that column or not ?

TY, Maurizio

Eyup
Telerik team
 answered on 03 Aug 2017
0 answers
317 views

Hello Telerik Team,

<Reposting this thread from ComboBox forum to this Grid forum, as I thought it is more appropriate to put it here.>

Original link: http://www.telerik.com/forums/need-help-on-radcombobox-multi-checkbox-filtering-not-working

 

I can't seem to make multiple checkbox filtering work on a RadComboBox inside a RadGrid using a Filter Template.

I have been working on the examples given on the thread below for several days already..

http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ

Particularly, I used Eyup's sample solution of RadGridFilterComboClientAndServerDataBinding and modified the DataSource to have advance data binding, as I need to populate my RadComboBox in the code behind. But this sample code only supported single item filtering..

So I used the code coming from SearchMultipleValues.aspx and SearchMultipleValues.aspx.cs to implement the multi checkbox filtering. This code can be found on Eyup's post below, inside RadGridFilterMultipleChecked.zip:

http://www.telerik.com/support/code-library/multi-selection-radcombobox-for-filtering-grid#2351833

Please check my combined aspx code and code behind below.
ASPX Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGridFilterComboClientAndServer.aspx.cs" Inherits="RadGridFilterComboClientAndServer" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2012.3.1308.35, PublicKeyToken=121fae78165ba3d4, Culture=neutral" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
  
<!DOCTYPE html>
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
        </asp:ScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
            GridLines="None" Width="800px" OnNeedDataSource="RadGrid1_NeedDataSource" AllowFilteringByColumn="true"
            OnItemDataBound="RadGrid1_ItemDataBound" OnPreRender="RadGrid1_PreRender" OnItemCommand="RadGrid1_ItemCommand">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID">
                <Columns>
                    <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32"
                        FilterControlAltText="Filter OrderID column" HeaderText="OrderID"
                        ReadOnly="True" SortExpression="OrderID" UniqueName="OrderIDClient">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="RadComboBoxClientInner" Height="100px" AppendDataBoundItems="true"
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("OrderIDClient").CurrentFilterValue %>'
                                OnDataBinding="RadComboBoxes_DataBinding" DataTextField="TextFieldName" DataValueField="ValueFieldName"
                                runat="server" OnClientSelectedIndexChanged="CountryIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
                                <script type="text/javascript">
                                    function CountryIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("OrderIDClient", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
                            </telerik:RadScriptBlock>
                        </FilterTemplate>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32"
                        FilterControlAltText="Filter OrderID column" HeaderText="OrderID"
                        ReadOnly="True" SortExpression="OrderID" UniqueName="OrderIDServer">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="RadComboBoxServerInner" Height="100px" AppendDataBoundItems="true"
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("OrderIDServer").CurrentFilterValue %>'
                                OnDataBinding="RadComboBoxes_DataBinding" DataTextField="TextFieldName" DataValueField="ValueFieldName"
                                OnSelectedIndexChanged="RadComboBoxServerInner_SelectedIndexChanged"
                                runat="server" AutoPostBack="true">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                            </telerik:RadComboBox>
                        </FilterTemplate>
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn DataField="OrderDate" DataType="System.DateTime"
                        FilterControlAltText="Filter OrderDate column" HeaderText="OrderDate"
                        SortExpression="OrderDate" UniqueName="OrderDate">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridNumericColumn DataField="Freight" DataType="System.Decimal"
                        FilterControlAltText="Filter Freight column" HeaderText="Freight"
                        SortExpression="Freight" UniqueName="Freight">
                    </telerik:GridNumericColumn>
                    <telerik:GridBoundColumn DataField="ShipName"
                        FilterControlAltText="Filter ShipName column" HeaderText="ShipName"
                        SortExpression="ShipName" UniqueName="ShipName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipCountry"
                        FilterControlAltText="Filter ShipCountry column" HeaderText="ShipCountry"
                        SortExpression="ShipCountry" UniqueName="ShipCountry">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Quantity"
                        FilterControlAltText="Filter Quantity column" HeaderText="Quantity"
                        SortExpression="Quantity" UniqueName="Quantity">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="RadComboBoxQuantity" DataTextField="Quantity"
                                DataValueField="Quantity" Height="100px" AppendDataBoundItems="true" CheckBoxes="true"
                                runat="server" EmptyMessage="Select Quantity" Skin="Metro" Filter="Contains" OnDataBinding="RadComboBoxQuantity_DataBinding">
                            </telerik:RadComboBox>
                            <asp:ImageButton ID="ImageButton1" runat="server" AlternateText="Filter" ToolTip="Filter by Quantity" OnClick="ImageButton1_Click" ImageUrl="~/worldSearch.png" />
                        </FilterTemplate>
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </form>
</body>
</html>

 

Code Behind:

 

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
  
public partial class RadGridFilterComboClientAndServer : System.Web.UI.Page
{
    bool isFiltered = false;
  
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = GetGridSource();
    }
    protected void RadComboBoxServerInner_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        GridFilteringItem filterItem = (sender as RadComboBox).NamingContainer as GridFilteringItem;
        filterItem.OwnerTableView.GetColumn("OrderIDServer").CurrentFilterValue = e.Value;
        filterItem.FireCommandEvent("Filter", new Pair("EqualTo", "OrderIDServer"));
    }
    private DataTable GetGridSource()
    {
        DataTable dataTable = new DataTable();
  
        DataColumn column = new DataColumn();
        column.DataType = Type.GetType("System.Int32");
        column.ColumnName = "OrderID";
        dataTable.Columns.Add(column);
  
        column = new DataColumn();
        column.DataType = Type.GetType("System.DateTime");
        column.ColumnName = "OrderDate";
        dataTable.Columns.Add(column);
  
        column = new DataColumn();
        column.DataType = Type.GetType("System.Decimal");
        column.ColumnName = "Freight";
        dataTable.Columns.Add(column);
  
        column = new DataColumn();
        column.DataType = Type.GetType("System.String");
        column.ColumnName = "ShipName";
        dataTable.Columns.Add(column);
  
        column = new DataColumn();
        column.DataType = Type.GetType("System.String");
        column.ColumnName = "ShipCountry";
        dataTable.Columns.Add(column);
  
        column = new DataColumn();
        column.DataType = Type.GetType("System.String");
        column.ColumnName = "Quantity";
        dataTable.Columns.Add(column);
  
        DataColumn[] PrimaryKeyColumns = new DataColumn[1];
        PrimaryKeyColumns[0] = dataTable.Columns["OrderID"];
        dataTable.PrimaryKey = PrimaryKeyColumns;
  
        for (int i = 0; i <= 80; i++)
        {
            DataRow row = dataTable.NewRow();
            row["OrderID"] = i + 1;
            row["OrderDate"] = DateTime.Now;
            row["Freight"] = (i + 1) + (i + 1) * 0.1 + (i + 1) * 0.01;
            row["ShipName"] = "Name " + (i + 1);
            row["ShipCountry"] = "Country " + (i + 1);
            row["Quantity"] = "Quantity " + (i + 1);
  
            dataTable.Rows.Add(row);
        }
  
        return dataTable;
    }
    protected void RadComboBoxes_DataBinding(object sender, EventArgs e)
    {
        RadComboBox combo = sender as RadComboBox;
        combo.DataSource = Enumerable.Range(1, 6).Select(
            x => new { ValueFieldName = x, TextFieldName = "ID " + x });
    }
  
    protected void RadComboBoxQuantity_DataBinding(object sender, EventArgs e)
    {
        RadComboBox combo = sender as RadComboBox;
        combo.DataSource = GetGridSource();
        combo.DataTextField = "Quantity";
    }
  
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        GridFilteringItem filterItem = (sender as ImageButton).NamingContainer as GridFilteringItem;
        RadComboBox combo = filterItem.FindControl("RadComboBoxQuantity") as RadComboBox;
  
        List<string> expressions = new List<string>();
        List<string> quantity = new List<string>();
        foreach (RadComboBoxItem item in combo.CheckedItems)
        {
            quantity.Add(item.Text);
            expressions.Add("(it[\"Quantity\"].ToString().Contains(\"" + item.Text + "\"))");
        }
        isFiltered = true;
        string value = string.Join("OR", expressions.ToArray());
        ViewState["QuantityFilterValue"] = string.IsNullOrEmpty(value) ? value : "(" + value + ")";
        ViewState["Quantity"] = quantity;
    }
  
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.FilterCommandName)
        {
            isFiltered = true;
        }
    }
  
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
        {
            RadComboBox combo = (e.Item as GridFilteringItem).FindControl("RadComboBoxQuantity") as RadComboBox;
  
            if (ViewState["Quantity"] != null)
            {
                foreach (string quantity in (List<string>)ViewState["Quantity"])
                {
                    combo.FindItemByText(quantity).Checked = true;
                }
            }
        }
    }
  
    protected void RadGrid1_PreRender(object sender, System.EventArgs e)
    {
        if (isFiltered)
        {
            string[] expressions = RadGrid1.MasterTableView.FilterExpression.Split(new string[] { "AND" }, StringSplitOptions.None);
            List<string> columnExpressions = new List<string>(expressions);
            foreach (string expression in columnExpressions)
            {
                if (expression.Contains("[\"Quantity\"]"))
                {
                    columnExpressions.Remove(expression);
                    break;
                }
            }
            string finalExpression = string.Join("AND", columnExpressions.ToArray());
            string quantityFilterValue = (string)ViewState["QuantityFilterValue"];
            if (!string.IsNullOrEmpty(quantityFilterValue))
            {
                if (!string.IsNullOrEmpty(finalExpression))
                {
                    finalExpression += " AND ";
                }
                finalExpression += quantityFilterValue;
            }
            RadGrid1.MasterTableView.FilterExpression = finalExpression;
            RadGrid1.MasterTableView.Rebind();
        }
    }
}

 

I added a new column, "Quantity", which will be filtered using multi checkbox filtering. This is our focus which is not working.. This column is populated inside the GetGridSource(). Filter values are binded to the RadComboBox using RadComboBoxQuantity_DataBinding event, setting it to the same data source of the RadGrid. (I know I should bind distinct values here, but just for the purpose of an example I haven't updated the code yet.)

Selecting several items from the combobox and clicking ImageButton1, multi checkbox filtering does not work..

Note: I put Filter="Contains" in the RadComboBox property as I read somewhere here and in the documentation that this will enable the textfield in the combo box so the user can type, which I also need.

I am currently stuck using Telerik.Web.UI, Version=2012.3.1308.35. Would anyone know why the multi checkbox filtering does not work?

Any help is appreciated.. Thank you in advance.

Barry
Top achievements
Rank 1
 asked on 03 Aug 2017
0 answers
103 views

I have been trying to implement a RadGrid with batch edit mode enabled. It is essentially just a grid that makes calls to entity framework to update data in a SQL database. It works fine sometimes, but, usually after I've saved changes a few times, all AJAX calls stop working on the page. I have been trying a lot of different ways of reproducing the bug consistently, but I can't figure out how. I usually just add a few records, and edit a few records, save, then repeat the process several times until eventually it stops working. When I press the button in this state, it will flash the loading symbol for a fraction of a second, but nothing else happens. Normally, the loading symbol shows for a second or two, then the grid and database update. The OnUpdateCommand, OnInsertCommand, and any other commands do not fire when in the erroneous state, and other controls on the page that use AJAX don't work anymore. I can't seem to find any code behind method that gets called upon attempting to call them. The pertinent (I think) code is in the page XAML file GateProduct.aspx, the control XAML file Checklist.ascx that contains the RadGrid, and the codebehind for the control Checklist.ascx.cs.  

GateProduct.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="GateProduct.aspx.cs" Inherits="GatesWebForm.Pages.GateProduct" %>

<%@ Register Src="~/Controls/Checklist.ascx" TagName="ChecklistPanel" TagPrefix="custom" %>
<%@ Register Src="~/Controls/Projects.ascx" TagName="ProjectsPanel" TagPrefix="custom" %>
<%@ Register Src="~/Controls/Documents.ascx" TagName="DocumentsPanel" TagPrefix="custom" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Styles/mail.css" rel="stylesheet" />
    <style type="text/css">
        html .RadGrid .rgMasterTable {
            height: auto;
        }

        .subject {
            position: relative;
        }
    </style>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FolderContent" runat="server">
    <div style="padding: 5px 5px 5px 5px">
        <asp:Panel runat="server" ID="InfoPanel" BackColor="LightBlue" BorderColor="Black" BorderWidth="2px">
            <asp:Label Text="Product: " runat="server" />
            <asp:Label ID="ProductName" runat="server" Font-Bold="True" /><br />
            <asp:Label runat="server" Text="Version:" />
            <asp:Label runat="server" ID="VersionText" Font-Bold="True" /><br />
            <asp:Label Text="Gate: " runat="server" />
            <asp:Label ID="GateId" runat="server" Font-Bold="True" /><br />
        </asp:Panel>
        
        <asp:HyperLink runat="server" Text="Back To Products" ID="ProductsHyperLink" CssClass="hyperLink"></asp:HyperLink>
    </div>
    <div style="padding: 5px 5px 5px 5px">
        <asp:Button runat="server" ID="DuplicateGateButton" Text="Duplicate this gate"
            OnClick="DuplicateGateButton_OnClick" />
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <telerik:RadTabStrip runat="server" RenderMode="Lightweight" ID="TabStrip" MultiPageID="MultiPage" SelectIndex="0">
        <Tabs>
            <telerik:RadTab runat="server" Text="Checklist" />
            <telerik:RadTab runat="server" Text="Projects" />
            <telerik:RadTab runat="server" Text="Documents" />
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="MultiPage" SelectedIndex="0">
        <telerik:RadPageView runat="server" ID="ChecklistPage">
            <custom:ChecklistPanel runat="server" ID="ChecklistPanel" />
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="ProjectsPage">
            <custom:ProjectsPanel runat="server" ID="ProjectsPanel" />
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="DocumentsPage">
            <custom:DocumentsPanel runat="server" ID="DocumentsPanel" />
        </telerik:RadPageView>
    </telerik:RadMultiPage>

    <telerik:RadWindowManager runat="server" ID="RadWindowManager">
    </telerik:RadWindowManager>

    <script type="text/javascript">
        function gatePromptCallBack(newGateId) {
            if (newGateId !== null) {
                var id = parseInt(getParamValues('id'));
                var gateId = newGateId.toLowerCase();
                PageMethods.DuplicateGateProduct(id, gateId);
            }
        }

        function getParamValues(key) {
            var query = window.location.search.substring(1);
            var params = query.split('&');

            for (var i = 0; i < params.length; i++) {
                var pos = query.indexOf('=');
                var k = params[i].substring(0, pos);
                var v = params[i].substring(pos + 1);

                if (key === k) return v;
            }
            return null;
        }

    </script>

    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel"></telerik:RadAjaxLoadingPanel>

    <asp:SqlDataSource runat="server" ID="GatesDataSource" ProviderName="System.Data.SqlClient"
        ConnectionString="<%$ ConnectionStrings:GatesConnectionString %>"
        SelectCommand="SELECT * FROM Gates ORDER BY Name" />
</asp:Content>

------

This is the control Checklist.ascx that has the RadGrid: 

 

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Checklist.ascx.cs" Inherits="GatesWebForm.Controls.Checklist" %>

<%@ Register Src="~/Controls/StatusMessage.ascx" TagName="StatusMessage" TagPrefix="custom" %>



<input id="ClientAreUnsavedChanges" type="hidden" runat="server"/>

<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManager">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ChecklistGrid" EventName="">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ChecklistPanel" LoadingPanelID="LoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="StatusMessage"/>
                <telerik:AjaxUpdatedControl ControlID="UnsavedChangesScript"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="NoChecklistPanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ChecklistPanel" LoadingPanelID="LoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="NoChecklistPanel" LoadingPanelID="LoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="CreateEmptyChecklistButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ChecklistPanel" LoadingPanelID="LoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="NoChecklistPanel" LoadingPanelID="LoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="CreateDefaultChecklistButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ChecklistPanel" LoadingPanelID="LoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="NoChecklistPanel" LoadingPanelID="LoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="DeleteSelectedButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ChecklistPanel" LoadingPanelID="LoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="StatusMessage"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="DeleteChecklistButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ChecklistPanel" LoadingPanelID="LoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="NoChecklistPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

<telerik:RadScriptBlock runat="server" ID="UnsavedChangesScript">
    <script type="text/javascript">
        function batchEditCellValueChanged() {
            window.onbeforeunload = function () {
                return true;
            }
        }

        function serverDataBound() {
            window.onbeforeunload = null;
        }
    </script>
</telerik:RadScriptBlock>

<h1>Checklist</h1>

<asp:Panel runat="server" ID="ChecklistPanel">
    <telerik:RadGrid ID="ChecklistGrid" runat="server" AllowPaging="true" DataSourceID="ChecklistItemsDataSource"
                     GridLines="None" Width="95%" AutoGenerateColumns="false" OnUpdateCommand="ChecklistGrid_UpdateCommand"
                     OnDeleteCommand="ChecklistGrid_OnDeleteCommand" OnInsertCommand="ChecklistGrid_OnInsertCommand"
                     AllowMultiRowSelection="True" AllowSorting="True" OnDataBound="ChecklistGrid_OnDataBound"
        OnItemCommand="ChecklistGrid_OnItemCommand" OnCallingDataMethods="ChecklistGrid_OnCallingDataMethods">
        <MasterTableView DataKeyNames="ChecklistItemId" CommandItemDisplay="Top" EditMode="Batch">
            <BatchEditingSettings OpenEditingEvent="Click"></BatchEditingSettings>
            <CommandItemSettings ShowSaveChangesButton="True"></CommandItemSettings>
            <Columns>
                <telerik:GridTemplateColumn DataField="Question" HeaderText="Question"
                                            SortExpression="Question" Resizable="True" UniqueName="Question">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "Question") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox runat="server" Text='<%# Bind("Question") %>' TextMode="MultiLine" ID="QuestionTextBox"/>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Comment" HeaderText="Comment"
                                            SortExpression="Comment" Resizable="True">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "Comment") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox runat="server" Text='<%# Bind("Comment") %>' TextMode="MultiLine" ID="CommentTextBox"/>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridDateTimeColumn DataField="DateAnswered" HeaderText="Date Answered"
                                            DataFormatString="{0:d}" PickerType="DatePicker"
                                            ConvertEmptyStringToNull="True" ReadOnly="True"
                                            Resizable="True"/>
            </Columns>
        </MasterTableView>
        <ClientSettings EnableAlternatingItems="False">
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="True"/>
            <Resizing AllowColumnResize="True" AllowRowResize="True"/>
            <ClientEvents OnBatchEditCellValueChanged="batchEditCellValueChanged"/>
        </ClientSettings>
    </telerik:RadGrid>

    <asp:Button runat="server" ID="DeleteSelectedButton" Text="Delete selected items"
                OnClick="DeleteSelectedButton_OnClick"
                OnClientClick="javascript:if (!confirm('Delete all selected?')) return false;"/>
    <asp:Button runat="server" ID="DeleteChecklistButton" Text="Delete entire checklist"
                OnClick="DeleteChecklistButton_OnClick"
                OnClientClick="javascript:if (!confirm('Delete entire checklist?')) return false;"/>
</asp:Panel>


<asp:Panel runat="server" ID="NoChecklistPanel">
    <asp:Label runat="server" Text="No checklist found."/>
    <br/>
    <asp:Button runat="server" ID="CreateEmptyChecklistButton" Text="Create Empty Checklist"
                OnClick="CreateEmptyChecklistButton_OnClick"/>
    <asp:Button runat="server" ID="CreateDefaultChecklistButton" Text="Create Default Checklist"
                OnClick="CreateDefaultChecklistButton_OnClick"/>
</asp:Panel>


<custom:StatusMessage runat="server" ID="StatusMessage" TargetControlId="ChecklistGrid"/>

<asp:SqlDataSource ID="ChecklistItemsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:GatesConnectionString %>"
                   ProviderName="System.Data.SqlClient"
                   SelectCommand="SELECT ChecklistItems.*, Answer, 
                            QuestionTypes.Name AS QuestionTypeName,
                            People.Name AS PersonName, 
                            People.Username AS PersonUsername,
                            Departments.Name AS DepartmentName
                            FROM ChecklistItems 
                            LEFT JOIN ChecklistAnswers
                            ON Answer_AnswerId = AnswerId
                            LEFT JOIN QuestionTypes 
                            ON Type_QuestionTypeId = QuestionTypeId
                            LEFT JOIN People 
                            ON PersonId = AssignedTo_PersonId
                            LEFT JOIN Departments
                            ON Department_DepartmentId = DepartmentId
                            WHERE Checklist_ChecklistId = @GateProductId">
    <SelectParameters>
        <asp:QueryStringParameter Name="GateProductId" QueryStringField="id"/>
    </SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="AnswersDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:GatesConnectionString %>"
                   ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM ChecklistAnswers ORDER BY Answer"/>
<asp:SqlDataSource runat="server" ID="PeopleDataSource"
                   ConnectionString="<%$ ConnectionStrings:GatesConnectionString %>"
                   ProviderName="System.Data.SqlClient"
                   SelectCommand="SELECT NULL AS PersonId, NULL AS Name
                UNION 
                SELECT PersonId, Name FROM People
                ORDER BY Name"/>

<asp:ObjectDataSource runat="server" ID="EmployeeDataSource" SelectMethod="GetActiveDirectoryUsers"
                      TypeName="GatesWebForm.Authenticator">
</asp:ObjectDataSource>

<asp:SqlDataSource runat="server" ID="QuestionTypesDataSource" ConnectionString="<%$ ConnectionStrings:GatesConnectionString %>"
                   ProviderName="System.Data.SqlClient" SelectCommand="SELECT NULL AS QuestionTypeId, NULL AS Name UNION SELECT QuestionTypeId, Name FROM QuestionTypes ORDER BY Name"/>

<asp:SqlDataSource runat="server" ID="DepartmentsDataSource" ConnectionString="<%$ ConnectionStrings:GatesConnectionString %>"
                   ProviderName="System.Data.SqlClient" SelectCommand="SELECT NULL AS DepartmentId, NULL AS Name UNION SELECT DepartmentId, Name FROM Departments ORDER BY Name"/>

 

----------

This is the code behind Checklist.ascx.cs:

 

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
using GatesDataEntry;
using GatesDataEntry.GateModels;
using GatesWebForm.Services;
using Microsoft.TeamFoundation.Common;
using Telerik.Web.UI;

namespace GatesWebForm.Controls
{
    public partial class Checklist : UserControl
    {
        private readonly GateContext mContext = new GateContext();
        private readonly Authenticator mAuthenticator = new Authenticator();

        private RadWindowManager mWindowManager;

        private ChecklistDataService mChecklistDataService;

        public bool AreUnsavedChanges
        {
            get => bool.Parse(ClientAreUnsavedChanges.Value);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            var id = int.Parse(Request.QueryString["id"], CultureInfo.InvariantCulture);
            if (mContext.Checklists.Any(c => c.ChecklistId == id))
            {
                ChecklistPanel.Visible = true;
                NoChecklistPanel.Visible = false;
            }
            else
            {
                ChecklistPanel.Visible = false;
                NoChecklistPanel.Visible = true;
            }

            mChecklistDataService = new ChecklistDataService(id, mContext);

            mWindowManager = Parent.FindControl("RadWindowManager") as RadWindowManager;
        }

        protected void ChecklistGrid_UpdateCommand(object sender, GridCommandEventArgs e)
        {
            if (!mAuthenticator.IsEditor())
            {
                mWindowManager.RadAlert("You do not have editor permissions.", 400, 100, "Need Permissions", null);
                return;
            }


            if (e.CommandArgument is GridBatchEditingEventArgument)
                try
                {
                    UpdateItem(e);
                }
                catch (Exception ex)
                {
                    e.Canceled = true;
                }
        }

        private void UpdateItem(GridCommandEventArgs e)
        {
            if (!(e.CommandArgument is GridBatchEditingEventArgument)) return;

            var editedItem = e.Item as GridEditableItem;
            var commandArgument = (GridBatchEditingEventArgument) e.CommandArgument;
            var newValues = commandArgument.NewValues;

            var tableView = commandArgument.OwnerTableView;
            tableView.ExtractValuesFromItem(newValues, editedItem);

            var id = (int) editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ChecklistItemId"];
            var question = (string) newValues["Question"];
            var comment = (string) newValues["Comment"]; 

            var answer = mContext.ChecklistAnswers.Single(a => a.Answer == "Done"); 

            mChecklistDataService.UpdateChecklistItem(id, question, answer, comment, null, null, null);
        }

        protected void ChecklistGrid_OnDeleteCommand(object sender, GridCommandEventArgs e)
        {
            if (!mAuthenticator.IsEditor())
            {
                mWindowManager.RadAlert("You do not have editor permissions.", 400, 100, "Need Permissions", null);
                return;
            }
            try
            {
                var id = (int) e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ChecklistItemId"];
                mChecklistDataService.DeleteChecklistItem(id);
            }
            catch (Exception)
            {
                e.Canceled = true;
            }

            ChecklistGrid.Rebind();
        }

        protected void ChecklistGrid_OnInsertCommand(object sender, GridCommandEventArgs e)
        {
            if (!mAuthenticator.IsEditor())
            {
                mWindowManager.RadAlert("You do not have editor permissions.", 400, 100, "Need Permissions", null);
                return;
            }

            try
            {
                var commandArgument = e.CommandArgument as GridBatchEditingEventArgument;
                var inputValues = commandArgument.NewValues;
                var question = (string) inputValues["Question"];
                var comment = (string) inputValues["Comment"]; 

                var answer = mContext.ChecklistAnswers.Single(a => a.Answer == "not done");

                mChecklistDataService.InsertChecklistItem(question, answer, comment, null, null, null);
                StatusMessage.DisplayMessage(false, "Successfully inserted checklist item.");
            }
            catch (Exception ex)
            {
                e.Canceled = true;
            }
        }

        protected void CreateEmptyChecklistButton_OnClick(object sender, EventArgs e)
        {
            if (!mAuthenticator.IsEditor())
            {
                mWindowManager.RadAlert("You do not have editor permissions.", 400, 100, "Need Permissions", null);
                return;
            }

            mChecklistDataService.CreateEmptyChecklist();
            ChecklistGrid.Rebind(); 
            NoChecklistPanel.Visible = false;
            ChecklistPanel.Visible = true;
        }

        protected void CreateDefaultChecklistButton_OnClick(object sender, EventArgs e)
        {
            if (!mAuthenticator.IsEditor())
            {
                mWindowManager.RadAlert("You do not have editor permissions.", 400, 100, "Need Permissions", null);
                return;
            }

            mChecklistDataService.CreateDefaultChecklist();
            ChecklistGrid.Rebind();
            NoChecklistPanel.Visible = false;
            ChecklistPanel.Visible = true;
        }
        
        protected void DeleteSelectedButton_OnClick(object sender, EventArgs e)
        {
            if (!mAuthenticator.IsEditor())
            {
                mWindowManager.RadAlert("You do not have editor permissions.", 400, 100, "Need Permissions", null);
                return;
            }
            try
            {
                if (ChecklistGrid.SelectedIndexes.Count == 0)
                    return;
                var ids = (from GridDataItem item in ChecklistGrid.SelectedItems
                           select (int) item.OwnerTableView.DataKeyValues[item.ItemIndex]["ChecklistItemId"]).ToList();
                mChecklistDataService.DeleteChecklistItemsRange(ids);

                StatusMessage.DisplayMessage(false, "Successfully deleted checklist items.");
            }
            catch (Exception ex)
            {
                StatusMessage.DisplayMessage(true, "Failed to delete checklist items.");
            }

            ChecklistGrid.Rebind();
        }

        protected void DeleteChecklistButton_OnClick(object sender, EventArgs e)
        {
            mChecklistDataService.DeleteChecklist(); 

            ChecklistPanel.Visible = false;
            NoChecklistPanel.Visible = true;
        }
        
        protected void ChecklistGrid_OnDataBound(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "setUnsavedChangesFalse", "serverDataBound();", true);
        }

        protected void ChecklistGrid_OnItemCommand(object sender, GridCommandEventArgs e)
        {
        }

        protected void ChecklistGrid_OnCallingDataMethods(object sender, CallingDataMethodsEventArgs e)
        {
            throw new NotImplementedException();
        }
    }
}

Cowan
Top achievements
Rank 1
 asked on 02 Aug 2017
0 answers
61 views

We have 2 tabstrips on one page. One is used as the overall tabstrip and the other as steps through a form submission. We're using the lightweight rendermode and are modifying the styles on the steps tabstrip using css. We'd like to remove the bottom border on the steps tabscrip but not on the primary. When we use:

html .rtsTop .rtsLevel1 {
    border-bottom: 0;
}

It removes it from both. If we try to just add the border-bottom attribute to the assigned class for the steps tabstrip it doesn't seem to work. Is there a good way to do this?

Also, is there a documentation page available that shows the CSS options in the lightweight rendermode for TabStrip. We couldn't seem to find it.

thanks

Jeff
Top achievements
Rank 1
 asked on 02 Aug 2017
2 answers
121 views
the 2 cases I need a sample of how to do from code behind.
examples
1) every 2nd wed of month
2) every 17th of month

MonthlyRecurrenceRule(dayOfMonth as integer, interval as integer, range as ...)

MonthlyRecurrenceRule(dayOrdinal as integer, daysOfWeekMask as RecurrenceDay, interval as integer, range as ...)

range I already have and just need the other values to set
Doug
Top achievements
Rank 1
 answered on 02 Aug 2017
0 answers
144 views

I have a radscheduler with agenda view. I want to change the color of certain rows like such: http://imgur.com/a/2ot4X

This is my radScheduler : 

1.<telerik:RadScheduler runat="server" ID="rs_Calendar"<br>                    SelectedView="AgendaView" AllowEdit="false" AllowDelete="false"<br>                    Height="100%" OverflowBehavior="Expand"<br>                    Width="100%" DataKeyField="TourInstanceId" DataSubjectField="Title"<br>                    DataStartField="DateStart" DataEndField="DateEnd" BackColor="#E6E6E6"<br>                    Skin="Metro" <br>                    OnAppointmentDataBound="rs_Calendar_AppointmentDataBound"<br>                     OnAppointmentCreated="RadScheduler1_AppointmentCreated"<br>                    OnNavigationComplete="rs_Calendar_NavigationComplete"<br>                    OnClientAppointmentInserting="CancelEvent"<br>                    OnClientAppointmentEditing="CancelEvent"<br>                    CustomAttributeNames="Color,TourInstanceId,Title,Bookings,Guideinitials,Availability,GroupName"<br>                    OnClientAppointmentMoveEnd="MoveAppt"<br>                    OnClientAppointmentResizeStart="ResizeAppt"<br>                    OnClientAppointmentClick="onClientAppointmentClick"<br>                    OnClientAppointmentDoubleClick="onClientAppointmentDoubleClick"><br>                    <WeekView UserSelectable="false" /><br>                    <DayView UserSelectable="false" /><br>                    <MonthView UserSelectable="true" /><br>                    <MultiDayView UserSelectable="false" /><br>                    <TimelineView UserSelectable="true" /><br>                    <AgendaView UserSelectable="true" /><br>                    <AppointmentTemplate><br>                        <div class="appt-title" style="border-color: <%# Eval("Attributes['BackGroundColor']") %>; color: <%# Eval("Attributes['TextColor']") %>;"><br><br>                            <span runat="server" id="calendar_icons_alerts"><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Completed']") %>" alt="Completed" width="20px" style="display: <%# Eval("Attributes['Completed']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Closed']") %>" alt="Closed" width="20px" style="display: <%# Eval("Attributes['Closed']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Custom']") %>" alt="Custom" width="50px" style="display: <%# Eval("Attributes['Custom']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Transfer']") %>" alt="Transfer" width="50px" style="display: <%# Eval("Attributes['Transfer']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Attention']") %>" alt="Attention" width="20px" style="display: <%# Eval("Attributes['Attention']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['No Bookings']") %>" alt="No Bookings" width="20px" style="display: <%# Eval("Attributes['No Bookings']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Headsets']") %>" alt="Headsets" width="20px" style="display: <%# Eval("Attributes['Headsets']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Bikes']") %>" alt="Bikes" width="20px" style="display: <%# Eval("Attributes['Bikes']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Tickets']") %>" alt="Tickets" width="20px" style="display: <%# Eval("Attributes['Tickets']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Guide']") %>" alt="Guide" width="20px" style="display: <%# Eval("Attributes['Guide']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Money']") %>" alt="Money" width="20px" style="display: <%# Eval("Attributes['Money']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Kids']") %>" alt="Kids" width="20px" style="display: <%# Eval("Attributes['Kids']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Voucher']") %>" alt="Voucher" width="20px" style="display: <%# Eval("Attributes['Voucher']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Arrange Transfer']") %>" alt="Arrange Transfer" width="20px" style="display: <%# Eval("Attributes['Arrange Transfer']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Radio']") %>" alt="Radio" width="20px" style="display: <%# Eval("Attributes['Radio']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['VIP client']") %>" alt="VIP client" width="20px" style="display: <%# Eval("Attributes['VIP client']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Finelli & Shaw']") %>" alt="Finelli & Shaw" width="20px" style="display: <%# Eval("Attributes['Finelli & Shaw']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Trip planning']") %>" alt="Trip planning" width="20px" style="display: <%# Eval("Attributes['Trip planning']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['People Together']") %>" alt="People Together" width="20px" style="display: <%# Eval("Attributes['People Together']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Press']") %>" alt="Press" width="20px" style="display: <%# Eval("Attributes['Press']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Restaurant Reservation']") %>" alt="Restaurant Reservation" width="20px" style="display: <%# Eval("Attributes['Restaurant Reservation']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Pick Up Location']") %>" alt="Pick Up Location" width="20px" style="display: <%# Eval("Attributes['Pick Up Location']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Drop Off Location']") %>" alt="Drop Off Location" width="20px" style="display: <%# Eval("Attributes['Drop Off Location']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Meeting Point']") %>" alt="Meeting Point" width="20px" style="display: <%# Eval("Attributes['Meeting Point']")!=null ? "inline-block": "none" %>" /><br>                            </span><br><br>                            <%# Eval("Subject") %><br>                        </div><br>                    </AppointmentTemplate><br>                </telerik:RadScheduler>

This is my c# code but the color is currently never changing:

protected void rs_Calendar_AppointmentDataBound(object sender, SchedulerEventArgs e)

{

 if (e.Appointment.DataItem is vw_CalendarDate)

   {

   vw_CalendarDate ce = (vw_CalendarDate)e.Appointment.DataItem;
   if (ce.Title != null && ce.Title.ToLower().StartsWith("sgt"))
    e.Appointment.BackColor = Color.Red;
  }
}
Cathal
Top achievements
Rank 1
 asked on 02 Aug 2017
0 answers
178 views

I have a radScheduler agenda view and I want to change the color of certain entries in the scheduler. I want to do something like this http://imgur.com/a/2ot4X where some rows are a certain color

This is my code at the moment but it is not working  

1.<p>protected void rs_Calendar_AppointmentDataBound(object sender, SchedulerEventArgs e)
<   if (e.Appointment.DataItem is vw_CalendarDate)<
    vw_CalendarDate ce = (vw_CalendarDate)e.Appointment.DataItem;
 if (ce.Title != null && ce.Title.ToLower().StartsWith("sgt"))
e.Appointment.BackColor = Color.Red;</p><p>}</p>

This is the code for the rad scheduler.

1.<telerik:RadScheduler runat="server" ID="rs_Calendar"<br>                    SelectedView="AgendaView" AllowEdit="false" AllowDelete="false"<br>                    Height="100%" OverflowBehavior="Expand"<br>                    Width="100%" DataKeyField="TourInstanceId" DataSubjectField="Title"<br>                    DataStartField="DateStart" DataEndField="DateEnd" BackColor="#E6E6E6"<br>                    Skin="Metro" <br>                    OnAppointmentDataBound="rs_Calendar_AppointmentDataBound"<br>                     OnAppointmentCreated="RadScheduler1_AppointmentCreated"<br>                    OnNavigationComplete="rs_Calendar_NavigationComplete"<br>                    OnClientAppointmentInserting="CancelEvent"<br>                    OnClientAppointmentEditing="CancelEvent"<br>                    CustomAttributeNames="Color,TourInstanceId,Title,Bookings,Guideinitials,Availability,GroupName"<br>                    OnClientAppointmentMoveEnd="MoveAppt"<br>                    OnClientAppointmentResizeStart="ResizeAppt"<br>                    OnClientAppointmentClick="onClientAppointmentClick"<br>                    OnClientAppointmentDoubleClick="onClientAppointmentDoubleClick"><br>                    <WeekView UserSelectable="false" /><br>                    <DayView UserSelectable="false" /><br>                    <MonthView UserSelectable="true" /><br>                    <MultiDayView UserSelectable="false" /><br>                    <TimelineView UserSelectable="true" /><br>                    <AgendaView UserSelectable="true" /><br>                    <AppointmentTemplate><br>                        <div class="appt-title" style="border-color: <%# Eval("Attributes['BackGroundColor']") %>; color: <%# Eval("Attributes['TextColor']") %>;"><br><br>                            <span runat="server" id="calendar_icons_alerts"><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Completed']") %>" alt="Completed" width="20px" style="display: <%# Eval("Attributes['Completed']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Closed']") %>" alt="Closed" width="20px" style="display: <%# Eval("Attributes['Closed']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Custom']") %>" alt="Custom" width="50px" style="display: <%# Eval("Attributes['Custom']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Transfer']") %>" alt="Transfer" width="50px" style="display: <%# Eval("Attributes['Transfer']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Attention']") %>" alt="Attention" width="20px" style="display: <%# Eval("Attributes['Attention']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['No Bookings']") %>" alt="No Bookings" width="20px" style="display: <%# Eval("Attributes['No Bookings']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Headsets']") %>" alt="Headsets" width="20px" style="display: <%# Eval("Attributes['Headsets']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Bikes']") %>" alt="Bikes" width="20px" style="display: <%# Eval("Attributes['Bikes']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Tickets']") %>" alt="Tickets" width="20px" style="display: <%# Eval("Attributes['Tickets']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Guide']") %>" alt="Guide" width="20px" style="display: <%# Eval("Attributes['Guide']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Money']") %>" alt="Money" width="20px" style="display: <%# Eval("Attributes['Money']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Kids']") %>" alt="Kids" width="20px" style="display: <%# Eval("Attributes['Kids']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Voucher']") %>" alt="Voucher" width="20px" style="display: <%# Eval("Attributes['Voucher']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Arrange Transfer']") %>" alt="Arrange Transfer" width="20px" style="display: <%# Eval("Attributes['Arrange Transfer']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Radio']") %>" alt="Radio" width="20px" style="display: <%# Eval("Attributes['Radio']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['VIP client']") %>" alt="VIP client" width="20px" style="display: <%# Eval("Attributes['VIP client']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Finelli & Shaw']") %>" alt="Finelli & Shaw" width="20px" style="display: <%# Eval("Attributes['Finelli & Shaw']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Trip planning']") %>" alt="Trip planning" width="20px" style="display: <%# Eval("Attributes['Trip planning']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['People Together']") %>" alt="People Together" width="20px" style="display: <%# Eval("Attributes['People Together']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Press']") %>" alt="Press" width="20px" style="display: <%# Eval("Attributes['Press']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Restaurant Reservation']") %>" alt="Restaurant Reservation" width="20px" style="display: <%# Eval("Attributes['Restaurant Reservation']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Pick Up Location']") %>" alt="Pick Up Location" width="20px" style="display: <%# Eval("Attributes['Pick Up Location']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Drop Off Location']") %>" alt="Drop Off Location" width="20px" style="display: <%# Eval("Attributes['Drop Off Location']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Meeting Point']") %>" alt="Meeting Point" width="20px" style="display: <%# Eval("Attributes['Meeting Point']")!=null ? "inline-block": "none" %>" /><br>                            </span><br><br>                            <%# Eval("Subject") %><br>                        </div><br>                    </AppointmentTemplate><br>                </telerik:RadScheduler>
Cathal
Top achievements
Rank 1
 asked on 02 Aug 2017
8 answers
478 views
Does the grid-filter not work with EntityDataSource-Control when AutoGenerateWhereClause is set to "true" ?

I've a grid bound on entitydatasource-control.
The DataSourceControl has whereparameters and the property AutoGenerateWhereClause is set to "true"
I'm filtering the column "CreateDate" with a selected value of radDatePicker on my page.
The first call of the page works fine and the data is filtered.

If i try to filter a column wiht "Equal" then an System.InvalidOperationException accours with the message:
AutoGenerateWhereClause can't be 'true' when Where is defined.


Here is the aspx-code:

      <asp:EntityDataSource ID="InventoryEntityDataSource" runat="server"  
                ConnectionString="name=Entities" DefaultContainerName="Entities"  
                EnableDelete="True" EnableInsert="True" EnableUpdate="True"  
                EntitySetName="Inventory"  
            EntityTypeFilter="Inventory" AutoGenerateWhereClause="True"  
            Select="" Where=""
                <WhereParameters> 
                    <asp:ControlParameter ControlID="ProcessDateRadDatePicker" Name="CreateDate"  
                        PropertyName="SelectedDate" /> 
                </WhereParameters> 
            </asp:EntityDataSource> 




Thank you for your help!



Eyup
Telerik team
 answered on 02 Aug 2017
1 answer
105 views

Hello Team, 

We have a new feature in application where we will have a page with one RadTreeView and two or three RadEditor.

The RadTreeView will be added to display the list of images and user will drag the image and drop to any editor.

As per the demo the one Treeview and one Editor is working okay. But when I add two or more Editor the dropping is not working in all editor. We can drop the image only the last editor.  I also tried to get the destination item (editor or div ) in OnClientNodeDropping event but I did not get the destination item. If we get it when we can add the image in destination item (editor or div ). 

Dear expert, is there anyway to get the Id of destination item in  OnClientNodeDropping event?

Or 

Any solution of this problem problem.

 

Thanks

 

 

 

 

Rumen
Telerik team
 answered on 02 Aug 2017
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?