yes you can do same by using datetime picker .try something like this,
'here is a code to show the data in grid
dim con as new sqlconnection("your connection string")
dim strQuery as string
strQuery = "select * from table1 where 1=1 "
'here is a code to add from date and to date , sometime if from date is selected and To date is not
'not defined then this code will show all records having InvoiceDate equal to or greater then selected date
'same like to date.
if dateTimePickerFrom.text <> "" then
strQuery = " and InvoiceDate >= '" + dateTimePickerFrom.text + "'"
if dateTimePickerTo.text <> "" then
strQuery = " and InvoiceDate <= '" + dateTimePickerTo.text + "'"
dim da as new sqldataadapter(strQuery,con)
dim dt as new datatable
datagrid.datasource = dt
i typed this code here so may be there are some spelling mistakes :P
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...