Yes, of curse. Here it is:
CODE
Dim orclstr As String = "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.9)(PORT=1523)))(CONNECT_DATA=(SID=orcl)(SERVER=DEDICATED)));User Id=user;Password=pass;"
Dim strsql As String = "select transportercode as ""Airline"", flightnr as ""Flight Nr."", nvl2(nullif(is_nil,0),'Yes','No') as ""Is NIL"", flight_date as ""Date"", depart_airport as ""Departure"", unloading_airp as ""Destination"", nvl(truck,'N/A') as ""truck"", nvl(aircraft_code, 'N/A') as ""Aircraft Code"", obs as ""Observations"" from ffm where flightnr='" + ListBox1.SelectedValue + "' and flight_date=to_date('" + CStr(DateTimePicker1.Value.Day) + "-" + CStr(DateTimePicker1.Value.Month) + "-" + CStr(DateTimePicker1.Value.Year) + "','dd-mm-yyyy')"
dim dt as datatable = new datatable
'flight_date is a calendar date data type
Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(strsql, orclstr)
da = New OleDb.OleDbDataAdapter(strsql, orclstr)
Me.DataGridView2.DataSource = dt
I want the user to be able to edit the field "flight_date". As the app runs now, the data is presented in the cells of this columns like: 30/04/2009 .
The user can edit it, but unless he enters a valid date, in the format dd/mm/yyyy , an error is raised.
For limiting user bad input, I want the user to be able to pick a calendar date from a picker.
To create a column with datetimepicker, I used the code found at:
http://msdn.microsoft.com/en-us/7tas5c80.aspx[/url]
With this I can create a column with date picker, but only before the binding:
CODE
Me.DataGridView2.DataSource = dt
I want the column type of flight_date column to be date picker.
How can I do that? How to change the column type after binding? Or, how to declare the DGV column type and bind it after this?
If you have any other suggestions, I would be grateful.
Thanks a lot.