DatePicker in BrowseDialog not working


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Ben Hayat is correct.  The GetType() does not return a DateTime but rather a Nullable data type....thus you will never get a DateTime field.  You are better off using the Return Alternate Value on Null rather than Nullable within the Customization so that the data type remains a DateTime but allows for a NULL exception.  As long as you have your field typed as a Nullable (or use Nullable Generics within the customization) the BrowseDialog will never see that property as a DateTime.
Ben Hayat
Ben Hayat
Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)Advanced StrataFrame User (548 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Is this field set to "Allow Null"? I suspect it's looking for "Nullable" type rather date type!

..ßen
rmoore
rmoore
StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)
Group: Forum Members
Posts: 21, Visits: 84
I have verified that that the datatype is a date. Here is screenshot of the designer.vb file of the BO.




Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The BrowseDialog will automatically show a date time picker for any field type of a DateTime.  So the only reason you would not be getting a date/time picker is if your BO property that the field represents is not of a DateTime data type.

The above image shown is representing the cust_Created field on the Customers BO in the VB.NET tutorial.  I went in and created a browse, added the cust_Created field to the SearchFields collection, associated the BrowseDialog with the MaintenanceFormToolstrip and ran and received the results above.  Below is a screen shot of the strong-typed property of the field which can be found in the designer.vb file of the BO.


rmoore
rmoore
StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)StrataFrame Beginner (29 reputation)
Group: Forum Members
Posts: 21, Visits: 84
I have a browse dialog and want to show a datepicker in but it's only showing as a textbox. I have made sure that the field in the database is of datetime and that is was mapped successfully in the business object. I have tried it on another browse dialog with the same results. Any ideas?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search