Abhijit Shetty
Top achievements
Rank 2
Abhijit Shetty
asked on 11 Aug 2013, 01:36 PM
Hi,
I have set
and fetching filter expression as string on ClientEvents>OnCommand event with code as
Output of above is:
([CreatedDate] >= '01,Aug,,2013') AND ([CreatedDate] <= '09,Aug,,2013')
I dont know why that comma(,) appears.
I have set
EnableRangeFiltering="true"
sender.get_masterTableView().get_filterExpressions().toString()
Output of above is:
([CreatedDate] >= '01,Aug,,2013') AND ([CreatedDate] <= '09,Aug,,2013')
I dont know why that comma(,) appears.
5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 12 Aug 2013, 07:34 AM
Hi Abhijit,
Can you please try the below simple code and check if the issue exists?The code snippet works fine at my end.Can you provide the full code if this doesn't help.
ASPX:
JS:
Thanks,
Princy
Can you please try the below simple code and check if the issue exists?The code snippet works fine at my end.Can you provide the full code if this doesn't help.
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowFilteringByColumn
=
"true"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridDateTimeColumn
DataField
=
"OrderDate"
HeaderText
=
"OrderDate"
UniqueName
=
"OrderDate"
EnableRangeFiltering
=
"true"
>
</
telerik:GridDateTimeColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"OnCommand"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
JS:
<script type=
"text/javascript"
>
function
OnCommand(sender) {
var
s = sender.get_masterTableView().get_filterExpressions().toString();
alert(s);
}
</script>
Thanks,
Princy
0
Abhijit Shetty
Top achievements
Rank 2
answered on 13 Aug 2013, 06:14 PM
Hi Princy,
Thanks for your quick and valuable reply.
But I'm doing similar thing but dont know why m getting weird dates when set
I have attached a screenshot on values that i get using alert.(PFA)
Thanks for your quick and valuable reply.
But I'm doing similar thing but dont know why m getting weird dates when set
EnableRangeFiltering="true"
Weird thing is when i set it to fa
lase date gets properly rendered.<
telerik:radgrid
id
=
"rgData"
runat
=
"server"
autogeneratecolumns
=
"false"
>
<
mastertableview
allowfilteringbycolumn
=
"true"
>
<
Columns
>
<
telerik:GridDateTimeColumn
AllowFiltering
=
"true"
UniqueName
=
"CreatedDate"
DataField
=
"CreatedDate"
HeaderText
=
"Created Date"
DataType
=
"System.DateTime"
PickerType
=
"DatePicker"
EnableRangeFiltering
=
"true"
>
</
telerik:GridDateTimeColumn
>
</
Columns
>
</
mastertableview
>
<
clientsettings
>
<
ClientEvents
OnCommand
=
"GridCommand"
/>
</
clientsettings
>
</
telerik:radgrid
>
function
GridCommand(sender, args) {
var
filterExpressions = sender.get_masterTableView().get_filterExpressions().toString();
alert(filterExpressions);
args.set_cancel(
true
);
}
I have attached a screenshot on values that i get using alert.(PFA)
0
Princy
Top achievements
Rank 2
answered on 14 Aug 2013, 12:19 PM
Hi Abhijit
Unfortunately i couldn't replicate the issue.The code is working fine at my side.My version is 2013.2.611.40 .Please find the attached screen shot and here is my complete code.
ASPX:
JS:
Thanks,
Princy
Unfortunately i couldn't replicate the issue.The code is working fine at my side.My version is 2013.2.611.40 .Please find the attached screen shot and here is my complete code.
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"false"
>
<
MasterTableView
AllowFilteringByColumn
=
"true"
>
<
Columns
>
<
telerik:GridDateTimeColumn
AllowFiltering
=
"true"
UniqueName
=
"OrderDate"
DataField
=
"OrderDate"
HeaderText
=
"OrderDate"
DataType
=
"System.DateTime"
PickerType
=
"DatePicker"
EnableRangeFiltering
=
"true"
>
</
telerik:GridDateTimeColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"GridCommand"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
JS:
<script type=
"text/javascript"
>
function
GridCommand(sender, args) {
var
filterExpressions = sender.get_masterTableView().get_filterExpressions();
alert(filterExpressions);
}
</script>
Thanks,
Princy
0
Jannis
Top achievements
Rank 1
answered on 24 Sep 2015, 09:36 AM
Hi,
have the same issue with recent version 2015.2.826.40
Seems to be culture depending. ​Example here with german culture settings.
If i set EnableRangeFiltering="false" then i get the correct format
dd.MM.yyyy HH.mm.ss
If i set EnableRangeFiltering="true" i get
dd.MM.yyyy,HH.mm.ss
Any fix for this?
Best regards
Jannis
0
Hi Jannis,
I've created a sample RadGrid web site to test the range filtering with german culture and it works correctly on my side. Please run the attached application and let me know about the result on your side.
Regards,
Eyup
Telerik
I've created a sample RadGrid web site to test the range filtering with german culture and it works correctly on my side. Please run the attached application and let me know about the result on your side.
Regards,
Eyup
Telerik
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 Feedback Portal
and vote to affect the priority of the items