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

Problem RadDatePicker İn RadGrid Filter

3 Answers 130 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Kübra Uygur
Top achievements
Rank 1
Kübra Uygur asked on 23 Jul 2010, 10:04 AM
Hi,
I'm kübra.Im Turkish.I using the radDatePicker in radgrid filterTemplate.I change radDatePicker DataFormatString={0:dd/MM/yyyy} and DateInput dateFormat={0:dd/MM/yyyy}.But it doesnt work.Because telerik doesnt support turkish dateformat.If I change dateInput DateFormat={0:yyyy/MM/dd}.It is work.I dont understand.why ıt doesnt support.

My Code Line

<

telerik:GridBoundColumn DataField="Start_Date" DataType="System.DateTime"

HeaderText="<%$Resources:GridColumnStartDateText %>" SortExpression="Start_Date" UniqueName="Start_Date"

 

 

DataFormatString="{0:dd/MM/yyyy}" >

 

 

<FilterTemplate>

 

 

<telerik:RadDatePicker ID="Start_DateDatePicker" runat="server" Width="100px" MinDate="07-04-1996" Skin="Sunset"

 

 

MaxDate="05-06-2020" ClientEvents-OnDateSelected="DateSelected" >

 

 

<DateInput DateFormat="dd/MM/yyyy"></DateInput>

 

 

</telerik:RadDatePicker>

 

 

<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">

 

 

 

<script type="text/javascript">

 

 

function DateSelected(sender, args) {

var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");

var date = FormatSelectedDate(sender.toString());

tableView.filter("Start_Date", date, "EqualTo");

}

function FormatSelectedDate(picker) {

var date = picker.get_selectedDate();

var dateInput = picker.get_dateInput();

var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());

return formattedDate;

}

</script>

 

 

 

 

</telerik:RadScriptBlock>

 

 

</FilterTemplate>

 

 

</telerik:GridBoundColumn>

This code block doesnt work.It doesnt filter.My javascript doesnt work,changing

 

<DateInput DateFormat="dd/MM/yyyy"></DateInput>.Can you hepl me please ?İt is ımportant for me :(

How can I? 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 29 Jul 2010, 07:28 AM
Hi Kübra,

Could you please try setting the Page.Culture property to "tr-TR":
<%@ Page Language="C#" AutoEventWireup="true" Culture="tr-TR" CodeFile="Default.aspx.cs" Inherits="Default" %>

and let me know if the issue still persists.


All the best,
Radoslav
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
0
Kübra Uygur
Top achievements
Rank 1
answered on 29 Jul 2010, 02:55 PM
Hi

my page has a culture property.Im again trying but it doesnt work.
0
Radoslav
Telerik team
answered on 03 Aug 2010, 12:08 PM
Hello Kübra,

I am sending you a simple example which demonstrates the desired functionality. Please check it out and let me know if it helps you.

Sincerely yours,
Radoslav
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
Filter
Asked by
Kübra Uygur
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Kübra Uygur
Top achievements
Rank 1
Share this question
or