I am facing problem in GridDateTimeColumn "Equal To " filter problem .I have one webpage having telerik:RadGrid .
In this page grid I am having
"<telerik:GridDateTimeColumn DataField="DateRefundRequested"
FilterListOptions="VaryByDataType" HeaderText="Date"
UniqueName="DateRefundRequested" HeaderStyle-Width="175px"
AllowFiltering="true" />
Column."
I assigned to datasource to this telerik grid. In this datasource datetime type column value binded to corresponding "telerik:GridDateTimeColumn" in that telerik grid.
When I run this page .the datasource value filled to gird. When I try to filter that grid is “EqualTo”.it was displayed is “No records found.”
But When I apply the filter is “GreaterThan” ,it was return the results.
So can you please suggest how to solve this issue.
This is my code:
<telerik:RadGrid runat="server" ID="ListGrid" ShowStatusBar="True"
AllowPaging="True" GridLines="None" Skin="Office2007"
PageSize="5" BorderStyle="Solid" AllowFilteringByColumn="True" AllowMultiRowSelection="True"
PagerStyle-AlwaysVisible="true" ShowGroupPanel="True"
OnNeedDataSource="ListGrid_NeedDataSource"
OnItemCommand="ListGrid_ItemCommand"
OnItemDataBound="ListGrid_ItemDataBound"
OnItemEvent="ListGrid_ItemEvent"
OnPreRender="ListGrid_PreRender"
Width="100%"
<ClientSettings AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="False" >
<Scrolling AllowScroll="false" UseStaticHeaders="false" />
</ClientSettings>
<GroupPanel ID="GridViewLeftGroupPanel" Text="Refund Requests">
<PanelStyle Width="100%" Height="20px" />
</GroupPanel>
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
<ItemStyle HorizontalAlign="Left" />
<mastertableview CommandItemDisplay="Top" AutoGenerateColumns="False" Width="100%"
CssClass="DetailTable_Default" DataKeyNames="PaymentRefundRequestID" NoMasterRecordsText="No records found." EditMode="InPlace" >
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
<CommandItemTemplate>
<div style="text-align: right; padding-top: 3px; padding-bottom: 3px; text-align: right; width: 100%;" >
<asp:LinkButton runat="server" ID="selectAll" Text="Select All"
CommandName="SelectAll" SkinID="GridSelectAllLinkButton"
meta:resourcekey="selectAllResource1" />
<asp:LinkButton runat="server" ID="unselectAll" Text="Deselect All"
CommandName="UnSelectAll" SkinID="GridUnSelectAllLinkButton" Visible="False"
meta:resourcekey="unselectAllResource1" />
<asp:LinkButton runat="server" ID="denyRefunds" Text="Deny Refund"
OnClientClick="return OpenDenyReasonWindow();"
SkinID="GridDenyRefundLinkButton" meta:resourcekey="denyRefundsResource1" />
<asp:LinkButton runat="server" ID="processRefunds" Text="Process Refund"
CommandName="ProcessRefunds" SkinID="GridProcessRefundLinkButton"
meta:resourcekey="processRefundsResource1" />
<asp:LinkButton ID="refreshPaymentsButton" runat="server" CommandName="Rebind"
Text="Refresh" ToolTip="Refresh" SkinID="GridRefreshLinkButton"
meta:resourcekey="refreshPaymentsButtonResource1" />
</div>
</CommandItemTemplate>
<Columns>
<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"
HeaderText="Select" AllowFiltering="false"
meta:resourcekey="GridTemplateColumnResource1">
<ItemTemplate>
<asp:CheckBox id="chbxSelect" OnCheckedChanged="ToggleRowSelection"
AutoPostBack="True" runat="server" meta:resourcekey="chbxSelectResource1"></asp:CheckBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="IsParentPayment" HeaderText=" "
HeaderStyle-Width="20px" UniqueName="ParentPayment" AllowFiltering="false"
ReadOnly="true">
<HeaderStyle Width="20px"></HeaderStyle>
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="DateRefundRequested" HeaderText="Date"
UniqueName="DateRefundRequested" HeaderStyle-Width="175px"
AllowFiltering="true" FilterListOptions="VaryByDataType"
meta:resourcekey="GridBoundColumnResource3" />
<telerik:GridBoundColumn DataField="EntPayID" HeaderText=""
DataType="System.Int32" UniqueName="EntPayID" AllowFiltering="False"
Visible="false" meta:resourcekey="GridBoundColumnResource4" />
<telerik:GridBoundColumn DataField="RefundReason" DataType="System.String"
HeaderText="Reason" UniqueName="RefundReason" AllowFiltering="true"
FilterListOptions="VaryByDataType"
meta:resourcekey="GridBoundColumnResource11" />
</Columns>
</mastertableview>
</telerik:RadGrid>
In this code "DateRefundRequested" GridDateTimeColumn column only i am trying to filter.but it is not working.
~ Thirunavukarasu
<
telerik:RadComboBox
ID
=
"RadComboBoxCategoryLevels"
Width
=
"400px"
AllowCustomText
=
"false"
runat
=
"server"
>
<
ItemTemplate
>
<
qsf:Catrunat
=
"server"
ID
=
"MYCat"
></
qsf:Cat
>
</
ItemTemplate
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
""
/>
</
Items
>
</
telerik:RadComboBox
>
I tried, but it does not work, Thanks
<
telerik:radgrid
id
=
"grdLeadList"
runat
=
"server"
autogeneratecolumns
=
"false"
allowpaging
=
"True"
allowsorting
=
"True"
pagesize
=
"5"
allowautomaticupdates
=
"true"
gridlines
=
"None"
allowmultirowselection
=
"true"
onitemcommand
=
"grdLeadList_ItemCommand"
OnItemDataBound
=
"grdLeadList_ItemDataBound"
OnEditCommand
=
"grdLeadList_EditCommand"
OnNeedDataSource
=
"grdLeadList_NeedDataSource"
DataKeyNames
=
"opportunityid"
style
=
"float: left; width: 965px;"
>
<
ExportSettings
HideStructureColumns
=
"true"
ExportOnlyData
=
"true"
IgnorePaging
=
"true"
>
<
Excel
Format
=
"ExcelML"
/>
<
Csv
ColumnDelimiter
=
"Comma"
RowDelimiter
=
"NewLine"
/>
<
Pdf
/>
</
ExportSettings
>
<
PagerStyle
Mode
=
"NextPrevNumericAndAdvanced"
/>
<
MasterTableView
Width
=
"100%"
TableLayout
=
"Auto"
DataKeyNames
=
"opportunityid"
>
<
CommandItemSettings
ShowExportToExcelButton
=
"false"
ShowExportToCsvButton
=
"false"
ShowExportToPdfButton
=
"false"
ShowAddNewRecordButton
=
"false"
/>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"CkhSelect"
HeaderText
=
"Select"
>
<
HeaderTemplate
>
<
asp:CheckBox
ID
=
"chkSelectAll"
runat
=
"server"
OnCheckedChanged
=
"ToggleSelectedState"
AutoPostBack
=
"True"
/>
</
HeaderTemplate
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"chkbxselect"
OnCheckedChanged
=
"ToggleRowSelection"
AutoPostBack
=
"True"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridEditCommandColumn
ButtonType
=
"LinkButton"
UpdateText
=
"Update"
CancelText
=
"Cancel"
EditText
=
"Edit"
UniqueName
=
"ClientSelectEdit"
/>
<
telerik:GridBoundColumn
DataField
=
"OpportunityId"
UniqueName
=
"OpportunityId"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"CustomerId"
HeaderText
=
"Company Name"
SortExpression
=
"CustomerId"
UniqueName
=
"CompanyName"
/>
<
telerik:GridBoundColumn
DataField
=
"Priority"
HeaderText
=
"Priority"
SortExpression
=
"Priority"
UniqueName
=
"Priority"
/>
<
telerik:GridBoundColumn
DataField
=
"Eval"
HeaderText
=
"Eval"
SortExpression
=
"Eval"
UniqueName
=
"Eval"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactName"
HeaderText
=
"Contact Name"
SortExpression
=
"ContactName"
UniqueName
=
"ContactName"
/>
<
telerik:GridBoundColumn
DataField
=
"Source"
HeaderText
=
"Source"
SortExpression
=
"Source"
UniqueName
=
"Source"
/>
<
telerik:GridBoundColumn
DataField
=
"State"
HeaderText
=
"State"
SortExpression
=
"State"
UniqueName
=
"State"
/>
<
telerik:GridNumericColumn
DataField
=
"Zip"
HeaderText
=
"Zip"
SortExpression
=
"Zip"
UniqueName
=
"Zip"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactStreetAddress"
UniqueName
=
"ContactStreetAddress"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactCity"
UniqueName
=
"ContactCity"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactState"
UniqueName
=
"ContactState"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactZip"
UniqueName
=
"ContactZip"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactPhone"
UniqueName
=
"ContactPhone"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactMobilePhone"
UniqueName
=
"ContactMobilePhone"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactEmail"
UniqueName
=
"ContactEmail"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Notes"
UniqueName
=
"Notes"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"EstimatedCloseDate"
UniqueName
=
"EstimatedCloseDate"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"MaturityValue"
UniqueName
=
"MaturityValue"
Visible
=
"false"
/>
<
telerik:GridDateTimeColumn
DataField
=
"CreatedOn"
DataFormatString
=
"{0:MM/dd/yy}"
HeaderText
=
"Creation Date"
SortExpression
=
"CreatedOn"
UniqueName
=
"CreationDate"
/>
<
telerik:GridBoundColumn
DataField
=
"DistributorStatus"
UniqueName
=
"DistributorStatus"
Visible
=
"false"
/>
</
Columns
>
<
EditFormSettings
UserControlName
=
"~/LeadShareEditPanel.ascx"
EditFormType
=
"WebUserControl"
>
<
EditColumn
UniqueName
=
"EditCommandColumn1"
/>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
EnableRowHoverStyle
=
"false"
>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
</
telerik:radgrid
>
<
div
style
=
"float: left; width: 965px;"
>
<
div
style
=
"width: 255px; height: 200px; float: left; margin: 10px 0px 0px 20px; font-family: Tahoma, Arial, Helvetica; font-size: 12px; font-weight: normal; color: #000000;"
>
<
div
style
=
"float: left; width: 255px;"
>
<
asp:Label
ID
=
"lblContactName"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.ContactName" ) %>' /> <
br
/>
<
asp:Label
ID
=
"lblContactStreetAddress"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.ContactStreetAddress" ) %>' /> <
br
/>
<
asp:Label
ID
=
"lblContactCity"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.ContactCity" ) + ", " + DataBinder.Eval( Container, "DataItem.ContactState" ) + " " + DataBinder.Eval( Container, "DataItem.ContactZip" ) %>' />
</
div
>
<
div
style
=
"float: left; width: 100px; margin: 10px 0px 0px 0px;"
>
<
span
style
=
"color: #949494;"
>Phone:</
span
> <
br
/>
<
asp:Label
ID
=
"lblContactPhone"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.ContactPhone" ) %>' />
</
div
>
<
div
style
=
"float: left; width: 100px; margin: 10px 0px 0px 0px;"
>
<
span
style
=
"color: #949494;"
>Mobile Phone:</
span
> <
br
/>
<
asp:Label
ID
=
"lblContactMobilePhone"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.ContactMobilePhone" ) %>' />
</
div
>
<
div
style
=
"float: left; width: 200px; margin: 10px 0px 0px 0px;"
>
<
span
style
=
"color: #949494;"
>Email:</
span
> <
br
/>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.ContactEmail" ) %>' />
</
div
>
<
div
style
=
"float: left; width: 200px; margin: 10px 0px 0px 0px;"
>
<
span
style
=
"color: #949494;"
>Source:</
span
> <
br
/>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.Source" ) %>' />
</
div
>
</
div
>
<
div
style
=
"float: left; width: 285px; margin: 10px 0px 0px 0px;"
>
<
span
style
=
"color: #949494; font-size: 12px; font-family: Tahoma, Arial, Helvetica;"
>Notes:</
span
> <
br
/>
<
telerik:RadTextBox
Width
=
"250px"
Height
=
"75px"
ID
=
"radTextBoxNotes"
runat
=
"server"
TextMode
=
"MultiLine"
Label
=
""
Text
=
""
>
</
telerik:RadTextBox
>
<
div
style
=
"float: left; margin: 10px 0px 0px 148px;"
>
<
asp:ImageButton
ID
=
"imgBtnSaveNote"
runat
=
"server"
ImageUrl
=
"~/images/saveNoteBtn.png"
onclick
=
"imgBtnSaveNote_Click"
OnClientClick
=
"Rebind();"
/>
</
div
>
<
div
style
=
"float: left; width: 250px;"
>
<
asp:Label
ID
=
"lblNotesHistory"
runat
=
"server"
Text='<%# DataBinder.Eval(Container, "DataItem.Notes").ToString().Replace("\r\n", "<br>") %>' style="color: #000000; font-size: 12px; font-family: Arial, Helvetica;" Width="250px" />
</
div
>
</
div
>
<
div
style
=
"float: left; width: 400px; margin: 10px 0px 0px 0px; height: 300px;"
>
<
div
style
=
"float: left; color: #949494; font-size: 12px; font-family: Tahoma, Arial, Helvetica; width: 300px;"
>
Evaluation:
</
div
>
<
div
style
=
"float: left; width: 400px;"
>
<
div
style
=
"float: left; width: 50px; color: #92d050; font-size: 38px; font-family: Arial, Helvetica; font-weight: bold; height: 90px; line-height: normal;"
>
<
asp:Label
ID
=
"lblEvalRating"
runat
=
"server"
Text='<%# Eval("Eval").ToString().Substring(0, 2) %>' onprerender="lblEvalRating_PreRender" />
</
div
>
<
div
style
=
"float: left; width: 345px;"
>
<
asp:RadioButtonList
RepeatDirection
=
"Vertical"
Width
=
"345px"
CellPadding
=
"0"
CellSpacing
=
"0"
ID
=
"rblChangeButtonType"
runat
=
"server"
AutoPostBack
=
"False"
SelectedValue='<%# Bind("EvalVal") %>'>
<
asp:ListItem
Value
=
"100000000"
Text
=
"No Evaluation Yet"
/>
<
asp:ListItem
Value
=
"100000001"
Text
=
"A - Existing application, ready to move on purchase"
/>
<
asp:ListItem
Value
=
"100000002"
Text
=
"B - Pending application, strong interest in Colder technology"
/>
<
asp:ListItem
Value
=
"100000003"
Text
=
"C - Interested but no immediate need"
/>
<
asp:ListItem
Value
=
"100000005"
Text
=
"F - Close lead, no potential"
/>
</
asp:RadioButtonList
>
</
div
>
<
div
style
=
"float: left; width: 115px; margin: 10px 0px 0px 50px;"
>
<
span
style
=
"color: #949494; font-size: 12px; font-family: Tahoma, Arial, Helvetica;"
>Est. Close Date:</
span
> <
br
/>
<
telerik:RadDatePicker
ID
=
"RadDatePicker1"
runat
=
"server"
ZIndex
=
"30001"
DbSelectedDate='<%# Bind("EstimatedCloseDate") %>' Width="115px" />
</
div
>
<
div
style
=
"float: left; width: 100px; margin: 10px 0px 0px 10px;"
>
<
span
style
=
"color: #949494; font-size: 12px; font-family: Tahoma, Arial, Helvetica;"
>Maturity Value:</
span
> <
br
/>
<
asp:TextBox
ID
=
"textBoxMaturityValue"
runat
=
"server"
Text='<%# DataBinder.Eval( Container, "DataItem.MaturityValue" ) %>' Width="85px" />
</
div
>
</
div
>
<
div
style
=
"float: left; width: 103px; margin: 10px 0px 0px 75px;"
>
<
a
href
=
"#dialog"
name
=
"modal"
><
img
src
=
"/images/backBtn.png"
alt
=
"Back"
style
=
"border: 0px;"
/></
a
>
</
div
>
<
div
style
=
"float: left; width: 76px; margin: 10px 0px 0px 10px;"
>
<
asp:ImageButton
ID
=
"imgBtnSaveAll"
runat
=
"server"
ImageUrl
=
"~/images/btnSaveAll.png"
onclick
=
"imgBtnSaveAll_Click"
/>
</
div
>
</
div
>
</
div
>
<
telerik:RadInputManager
ID
=
"RadInputManager1"
runat
=
"server"
>
<
telerik:NumericTextBoxSetting
BehaviorID
=
"NumericBehavior1"
EmptyMessage
=
"$"
Type
=
"Currency"
Validation-IsRequired
=
"false"
>
<
TargetControls
>
<
telerik:TargetInput
ControlID
=
"textBoxMaturityValue"
/>
</
TargetControls
>
</
telerik:NumericTextBoxSetting
>
</
telerik:RadInputManager
>