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

GridDateTimeColumn Page Reload on enter

3 Answers 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Klein
Top achievements
Rank 1
Eric Klein asked on 27 Nov 2013, 05:34 PM
I have a gird  on ap a web page and on the grid is a GridDateTimeColumn I allow filtering I have it set as

<telerik:GridDateTimeColumn DataField="TradeDate" DataFormatString="{0:MM/dd/yyyy}" DataType="System.DateTime" FilterControlAltText="Filter TradeDate column" HeaderText="Trade Date" ReadOnly="True" SortExpression="TradeDate" UniqueName="TradeDate" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  FilterControlWidth="110px"  EnableRangeFiltering="true" AutoPostBackOnFilter="true" ShowFilterIcon="false">
</telerik:GridDateTimeColumn>

This works fine but for some reason if the textbox next to the date time picker has focus and I hit the enter key it reloads the entire page.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 28 Nov 2013, 04:59 AM
Hi Eric,

If you set AutoPostBackOnFilter property of a column to True, the user does not need to press the filter button to initiate filtering. Instead, a postback filter operation occurs when the user types a filter in the filter box and presses [Enter] from the keyboard. Hence what you face is an expected behavior, since pressing [Enter] makes a postback.

Thanks,
Shinu
0
Eric Klein
Top achievements
Rank 1
answered on 28 Nov 2013, 11:58 AM
Yes I understand that.   What's happening is if I hit tab or lose focus in anyway it runs the filter.  The issue is when I hit enter it runs the filter, and the. Runs a complete page post back. The grid is ajaxified so all all other fields when I hit enter it refreshes just the grid, when I tab off of any of the filter boxes it refreshes the grid, but when I hit enter on the to date box and only the to date box it will refresh the grid, and the it runs a complete page reload which sets the grid back to the original state.
0
Eric Klein
Top achievements
Rank 1
answered on 29 Nov 2013, 01:35 PM
Ok never mind I found the issue.  It was a setting with the AjaxSetting they were set up in a way that it would cause that caused two distinct updates to run.
Tags
Grid
Asked by
Eric Klein
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Eric Klein
Top achievements
Rank 1
Share this question
or