473,563 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter Data Grid With calendar control

Hi,

Hope this is the correct forum to post in. I am new to ASP.NET. I have a
calendar control that I am using to select a date and then that date will
list all records that match the date selected in a datagrid. I have
everything set up but I am unable to get any records to show up. .NET still
has me a bit puzzled.

Here is the code I have on my code behind page and my sql statement. Any
help greatly appreciated.

Thanks.
Joey Durham
www.ultraweaver.com

SQL
SELECT
EndDate,
EventID,
EventName,
EventTypeID,
StartDate
FROM
Events
WHERE
(StartDate = @calStartDate)

CODE BEHIND
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

'Put user code to initialize the page here

daEmployeeList. Fill(DsEmployee List)

If IsPostBack Then

dgEventList.Dat aBind()

ddlEmployees.Da taBind()

txtStartDate.Te xt = calStartDate.Se lectedDate.ToSh ortDateString

txtEndDate.Text = calEndDate.Sele ctedDate.ToShor tDateString

End If

End Sub

Private Sub calStartDate_Se lectionChanged( ByVal sender As Object, ByVal e As
System.EventArg s) Handles calStartDate.Se lectionChanged

txtStartDate.Te xt = calStartDate.Se lectedDate.ToSh ortDateString

End Sub

Private Sub calEndDate_Sele ctionChanged(By Val sender As Object, ByVal e As
System.EventArg s) Handles calEndDate.Sele ctionChanged

txtEndDate.Text = calEndDate.Sele ctedDate.ToShor tDateString
Nov 17 '05 #1
1 4234
looks like you forgot to define your datasource:

dgEventList.Dat aSource = o_DataTable.Def aultView
dgEventList.Dat aBind

g.l.

"Joey Durham" <jo**@ultraweav er.com> wrote in message
news:eE******** ******@tk2msftn gp13.phx.gbl...
Hi,

Hope this is the correct forum to post in. I am new to ASP.NET. I have a
calendar control that I am using to select a date and then that date will
list all records that match the date selected in a datagrid. I have
everything set up but I am unable to get any records to show up. .NET still has me a bit puzzled.

Here is the code I have on my code behind page and my sql statement. Any
help greatly appreciated.

Thanks.
Joey Durham
www.ultraweaver.com

SQL
SELECT
EndDate,
EventID,
EventName,
EventTypeID,
StartDate
FROM
Events
WHERE
(StartDate = @calStartDate)

CODE BEHIND
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

'Put user code to initialize the page here

daEmployeeList. Fill(DsEmployee List)

If IsPostBack Then

dgEventList.Dat aBind()

ddlEmployees.Da taBind()

txtStartDate.Te xt = calStartDate.Se lectedDate.ToSh ortDateString

txtEndDate.Text = calEndDate.Sele ctedDate.ToShor tDateString

End If

End Sub

Private Sub calStartDate_Se lectionChanged( ByVal sender As Object, ByVal e As System.EventArg s) Handles calStartDate.Se lectionChanged

txtStartDate.Te xt = calStartDate.Se lectedDate.ToSh ortDateString

End Sub

Private Sub calEndDate_Sele ctionChanged(By Val sender As Object, ByVal e As
System.EventArg s) Handles calEndDate.Sele ctionChanged

txtEndDate.Text = calEndDate.Sele ctedDate.ToShor tDateString

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2389
by: Edward Burns | last post by:
I am trying to create an events calendar with a complete month view. I want to be able to get all the events for a particular month, using only one recordset on the page then be able to loop through each day of that month and output the events for a particular day for each day without having to open up 28 to 31 different recordsets. The...
4
5121
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced Filter/Sort window: A window in which you can create a filter from scratch. You enter criteria expressions in the filter design grid to restrict the...
0
1316
by: Nikkie | last post by:
Hi, In my asp.net application, I have datagrid control and a calendar control. The grid has a column for dates. All I want is, when I click on a cell in that column, the grid comes into edit mode, and then when I select a date on the calendar control, it should be displayed in the grid's column. I am not able to retrieve this value from...
11
2119
by: Thomas A | last post by:
Hi, I fill a datgrid with data from a xml document, it works fine But.... Now I will to filter the data to the grid so only the data shows from the criteria that I set. My code now is very simple to fill the grid
1
8282
by: sg | last post by:
Hi I'm starting programming in visual studio and c# and i have a problem with filtering datagrid. I build form with datagrid and i see data from database. I find in microsoft web page information how to create filtering data grid but this doesn't work. What I must change? My form code: using System; using System.Collections.Generic;...
1
1377
by: Richard Fagen | last post by:
Hi, What are the best practices to filter a datagrid based on user input? For example: I want to display a grid with rows of sales information and allowed the users to specify options (ex: customer and date ranges), then when they click the 'apply filter' button, I want the rows filtered. I've read about methods using a dataview with...
1
1270
by: kithir | last post by:
Hi, I am working with asp.net.In my webform i have an editable datagrid.I am loading data from the database.I want to enter data for the particular column of the grid.But that grid has more than 50 rows.It is very hard to scroll every time to search a particular row and enter data.So i want to filter the grid by some fields present in the...
0
1091
by: charmidd | last post by:
Does anyone know if it is possible to Drag data from a gridview and drop it in another control. I have a day calendar(ie...outlook's calendar) and I need to drag data from a grid listing into the calendar. Examples would be extremely helpful. Thanks!
15
2563
by: Gilles Ganault | last post by:
Hello Since Python is such a productive language, I'd really like to be able to use it to write GUI apps for Windows, but business apps require rich widgets like (DB)grids, calendars, etc. The ones available in wxWidgets looked a bit too basic compared to what's available for eg. Delphi or .Net, and don't seem to be under active...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.