This is a migrated thread and some comments may be shown as answers.

Grid repaint with Date Time Picker

1 Answer 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam Lindsay
Top achievements
Rank 1
Adam Lindsay asked on 17 May 2010, 08:40 PM
This one is odd.  I have a date time picker on a page with a grid.  When you mouse over the the datetime picker, the grid repaints.  This causes the grid column lines to redraw and makes the grid appear to flash.  More importantly, this causes an Ajax call every time the user mouses over the datetime picker.

Is this a known issue and is there any way around it?

Here is the code for my page:

Main Page:
....

 

<asp:Panel ID="divManageContainersHeader" runat="server" CssClass="MedPurpleBackground" Height="32px" Width="100%">

 

 

<div style="float: left; margin: 9px 0px 0px 7px; width: 70px;">

 

 

<asp:Label runat="server" ID="lblFacilityId" Text="<%$ Resources:Common, Facility %>"

 

 

ForeColor="White" TabIndex="-1" Font-Bold="true" />

 

 

</div>

 

 

<div style="float: left; margin: 5px 0px 0px 7px; width: 125px;">

 

 

<telerik:RadComboBox runat="server" ID="cbxFacilityId" MaxHeight="150" Width="150px"

 

 

EnableTextSelection="true" AllowCustomText="false" MarkFirstMatch="true" TabIndex="1"

 

 

Height="15" AutoPostBack="true"/>

 

 

</div>

 

 

</asp:Panel>

 

 

<div id="divManageContainersTabbedSection" class="RestrictedWidth" style="width: 100%;">

 

 

<telerik:RadTabStrip ID="rtsManageContainers" runat="server" Skin="Purple" EnableEmbeddedSkins="false"

 

 

Width="100%" SelectedIndex="0" MultiPageID="rmpManageContainers" Orientation="HorizontalTop"

 

 

Style="background-color: Gray" TabIndex="-1" OnClientTabSelecting="onTabSelecting"/>

 

 

<telerik:RadMultiPage ID="rmpManageContainers" runat="server" SelectedIndex="0">

 

 

<telerik:RadPageView runat="server">

 

 

<mcp:ManageContainersProcessing ID="ProcessingTab" runat="server" />

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server">

 

 

<mct:ManageContainersTransfer ID="TransferTab" runat="server" />

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server">

 

 

<mcw:ManageContainersWeigh ID="WeighTab" runat="server" />

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

</div>

 

...

ManageContainer Weigh User control (the one that is repainting):
...

 

<div id="divFirstLineFilters" style="float: left; width: 100%;">

 

 

<div style="float: left; margin-top: 5px; margin-left: 7px; width: 40px;">

 

 

<asp:Label runat="server" ID="lblStatus" CssClass="FieldFont1" ForeColor="Black"

 

 

Text="<%$ Resources:Common, Status %>" />

 

 

</div>

 

 

<div style="float: left; margin-top: 5px; margin-left: 7px; width: 160px;">

 

 

<telerik:RadComboBox runat="server" ID="cbxStatus" MaxHeight="150" Width="150px"

 

 

EnableTextSelection="true" AllowCustomText="false" MarkFirstMatch="true" TabIndex="1"

 

 

Height="15" />

 

 

</div>

 

 

<div style="float: left; margin-top: 5px; margin-left: 7px;">

 

 

<asp:Label runat="server" ID="lblWeighStation" CssClass="FieldFont1" ForeColor="Black"

 

 

Text="<%$ Resources:Common, Weigh Station %>" />

 

 

</div>

 

 

<div style="float: left; margin-top: 5px; margin-left: 5px; width: 150px;">

 

 

<telerik:RadComboBox runat="server" ID="cbxWeighStation" MaxHeight="150" Width="150px"

 

 

EnableTextSelection="true" AllowCustomText="false" MarkFirstMatch="true" TabIndex="1"

 

 

Height="15" />

 

 

</div>

 

 

<div style="float: left; margin-top: 8px; margin-left: 7px; width: 25px;">

 

 

<asp:Label runat="server" ID="lblCart" Text="<%$ Resources:Common, Cart %>" />

 

 

</div>

 

 

<div style="float: left; margin-top: 5px; margin-left: 7px; width: 180px;">

 

 

<telerik:RadComboBox runat="server" ID="cbxCart" MaxHeight="150" Width="150px" EnableTextSelection="true"

 

 

AllowCustomText="false" MarkFirstMatch="true" TabIndex="1" Height="15">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Value="" Text="<%$ Resources:Common, Select Any %>" Selected="true" />

 

 

<telerik:RadComboBoxItem Value="1" Text="<%$ Resources:Common, Yes %>" />

 

 

<telerik:RadComboBoxItem Value="0" Text="<%$ Resources:Common, No %>" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</div>

 

 

<div style="float: left; margin-top: 5px; margin-left: 7px;">

 

 

<asp:Label runat="server" ID="lblEmployee" CssClass="FieldFont1" ForeColor="Black"

 

 

Text="<%$ Resources:Common, Employee %>" />

 

 

</div>

 

 

<div style="float: left; margin-top: 5px; margin-left: 5px; width: 150px;">

 

 

<telerik:RadComboBox runat="server" ID="cbxEmployee" MaxHeight="150" Width="150px"

 

 

EnableTextSelection="true" AllowCustomText="false" MarkFirstMatch="true" TabIndex="1"

 

 

Height="15" />

 

 

</div>

 

 

</div>

 

 

<div id="divSecondLineFilters" style="float: left; width: 100%;">

 

 

<div id="BarcodeDataDiv" style="float: left; clear: both; margin-top: 2px; margin-left: 12px">

 

 

<table>

 

 

<tr>

 

 

<td style="width: 80px; text-align: left">

 

 

<asp:Label runat="server" ID="Label1" Text="<%$ Resources:Common, Customer %>" />

 

 

</td>

 

 

<td style="width: 35px; text-align: left">

 

 

<asp:Label runat="server" ID="Label2" Text="<%$ Resources:Common, Site %>" />

 

 

</td>

 

 

<td style="width: 80px; text-align: left">

 

 

<asp:Label runat="server" ID="Label3" Text="<%$ Resources:Common, Department %>" />

 

 

</td>

 

 

<td style="width: 80px; text-align: left">

 

 

<asp:Label runat="server" ID="Label4" Text="<%$ Resources:Common, Sequence %>" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 80px; text-align: left">

 

 

<telerik:RadTextBox ID="txtCustomerNumber" runat="server" MaxLength="7" Width="75px" />

 

 

</td>

 

 

<td style="width: 35px; text-align: left">

 

 

<telerik:RadTextBox ID="txtSite" runat="server" MaxLength="3" Width="35px" />

 

 

</td>

 

 

<td style="width: 80px; text-align: left">

 

 

<telerik:RadTextBox ID="txtDepartment" runat="server" MaxLength="3" Width="75px" />

 

 

</td>

 

 

<td style="width: 80px; text-align: left">

 

 

<telerik:RadTextBox ID="txtSequence" runat="server" MaxLength="4" Width="75px" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

<div style="float: left; margin-top: 25px; margin-left: 7px; width: 80px;">

 

 

<asp:Label runat="server" ID="lblFromDate" CssClass="FieldFont1" ForeColor="Black"

 

 

Text="<%$ Resources:Common, From Date %>" />

 

 

</div>

 

 

<div style="float: left; margin-top: 22px; margin-left: 7px; width: 165px;">

 

 

<telerik:RadDateTimePicker ID="dtpFromDate" runat="server" Width="160px" TimeView-TimeFormat="HH:mm" />

 

 

</div>

 

 

<div style="float: left; margin-top: 25px; margin-left: 7px; width: 50px;">

 

 

<asp:Label runat="server" ID="lblToDate" CssClass="FieldFont1" ForeColor="Black"

 

 

Text="<%$ Resources:Common, To Date %>" />

 

 

</div>

 

 

<div style="float: left; margin-top: 22px; margin-left: 7px; width: 165px;">

 

 

<telerik:RadDateTimePicker ID="dtpToDate" runat="server" Width="160px" TimeView-TimeFormat="HH:mm" />

 

 

</div>

 

 

<div style="float: left; margin-left: 7px; margin-top: 22px;">

 

 

<asp:Button ID="btnMCWApplyFilter" runat="server" CssClass="DarkPurpleButton" UseSubmitBehavior="false"

 

 

OnClientClick="return loadMCWGridData();" Text="<%$ Resources:Common, Apply Filter %>"

 

 

Visible="true" Width="125px" />

 

 

</div>

 

 

</div>

 

</

 

asp:Panel>

 

<

 

div id="WeighGridContainer" style="min-height: 300px">

 

 

<telerik:RadGrid ID="rgMCWeigh" runat="server" Height="200px" AllowPaging="true"

 

 

GridLines="Both" AllowMultiRowSelection="False" Width="100%" AllowSorting="true"

 

 

PageSize="50" TabIndex="-1" Skin="Purple" EnableEmbeddedSkins="false">

 

 

<ClientSettings AllowKeyboardNavigation="True">

 

 

<DataBinding Location="~/Services/ManageContainersWebService.asmx" SelectMethod="GetWeigh">

 

 

</DataBinding>

 

 

<ClientEvents OnGridCreated="rgMCWeigh_Created" OnRowDblClick="rgMCWeigh_RowDblClick"

 

 

OnCommand="rgMCWeigh_Command" />

 

 

<Resizing AllowColumnResize="True" AllowRowResize="False" />

 

 

<Selecting AllowRowSelect="True" />

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" />

 

 

</ClientSettings>

 

 

<MasterTableView AutoGenerateColumns="false" TabIndex="-1" Width="100%">

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Status %>" DataField="RecordStatus" UniqueName="RecordStatus" SortExpression="RecordStatus" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Date %>" DataField="ScanDatetimeString" UniqueName="ScanDatetimeString" SortExpression="ScanDatetime" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Container Id %>" DataField="LabelBarcode" UniqueName="LabelBarcode" SortExpression="LabelBarcode" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Svccode %>" DataField="Svccode" UniqueName="Svccode" SortExpression="Svccode" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Weigh Station %>" DataField="WeighStationCode" UniqueName="WeighStationCode" SortExpression="WeighStationCode" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Weight %>" DataField="GrossWeight" UniqueName="GrossWeight" SortExpression="GrossWeight" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Employee %>" DataField="EmployeeName" UniqueName="EmployeeName" SortExpression="EmployeeName" />

 

 

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Cart %>" DataField="CartFgText" UniqueName="CartFgText" SortExpression="CartFgText" />

 

 

</Columns>

 

 

<NoRecordsTemplate>

 

 

<div class="NoRecordText">

 

 

<asp:Literal ID="litNoRecords" runat="server" Text="<%$ Resources:Common, No records to display. %>" />

 

 

</div>

 

 

</NoRecordsTemplate>

 

 

</MasterTableView>

 

 

<PagerStyle Mode="NumericPages" AlwaysVisible="true" />

 

 

</telerik:RadGrid>

 

</

 

div>

 

...

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 19 May 2010, 11:34 AM
Hi Adam,

The behavior which you mentioned is indeed strange, and should not be present. I reviewed the code, and it seems correct. If the problem persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will review it locally, and get back to you with more information on the matter.

All the best,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Adam Lindsay
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or