Hi,
I want to filter records in a grid view using the calendar control . . . . I can get it to work using a text box, but using the calendar is totally eluding me
Any assistance will be greatly appreciated . . .
If it helps, the date (REPOT_DATE) is returned like this example: 23-11-2012
This is what my page looks like:
<asp:Calendar ID="calRepotDate"
runat="server"
FirstDayOfWeek="Sunday"
SelectionMode="DayWeek"
ShowGridLines="True"
ShowNextPrevMonth="False">
</asp:Calendar>
<asp:GridView ID="grdRepotDailySummary" runat="server"
AutoGenerateColumns="False" DataSourceID="odsRepotDailySummary" AllowPaging="True">
<Columns>
<asp:BoundField DataField="PAL_FACTOR" HeaderText="PAL_FACTOR" SortExpression="PAL_FACTOR" />
<asp:BoundField DataField="PICK_MIN" HeaderText="PICK_MIN" SortExpression="PICK_MIN" />
<asp:BoundField DataField="REPOT_DATE" HeaderText="REPOT_DATE" SortExpression="REPOT_DATE" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRepotDailySummary" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="RepotsTableAdapters.REPOTS_DAILY_SUMMARY"
FilterExpression="REPOT_DATE = '{0}' ">
<FilterParameters>
<asp:ControlParameter Name="REPOT_DATE" ControlID="calRepotDate" PropertyName="SelectedDate" />
</FilterParameters>
</asp:ObjectDataSource>
I want to filter records in a grid view using the calendar control . . . . I can get it to work using a text box, but using the calendar is totally eluding me
Any assistance will be greatly appreciated . . .
If it helps, the date (REPOT_DATE) is returned like this example: 23-11-2012
This is what my page looks like:
<asp:Calendar ID="calRepotDate"
runat="server"
FirstDayOfWeek="Sunday"
SelectionMode="DayWeek"
ShowGridLines="True"
ShowNextPrevMonth="False">
</asp:Calendar>
<asp:GridView ID="grdRepotDailySummary" runat="server"
AutoGenerateColumns="False" DataSourceID="odsRepotDailySummary" AllowPaging="True">
<Columns>
<asp:BoundField DataField="PAL_FACTOR" HeaderText="PAL_FACTOR" SortExpression="PAL_FACTOR" />
<asp:BoundField DataField="PICK_MIN" HeaderText="PICK_MIN" SortExpression="PICK_MIN" />
<asp:BoundField DataField="REPOT_DATE" HeaderText="REPOT_DATE" SortExpression="REPOT_DATE" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRepotDailySummary" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="RepotsTableAdapters.REPOTS_DAILY_SUMMARY"
FilterExpression="REPOT_DATE = '{0}' ">
<FilterParameters>
<asp:ControlParameter Name="REPOT_DATE" ControlID="calRepotDate" PropertyName="SelectedDate" />
</FilterParameters>
</asp:ObjectDataSource>