Enforcing data type on searchfield UI in BrowseDialog


Author
Message
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)Advanced StrataFrame User (892 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Many of my Searchfields are integers and for a lot of them I can't use a dropdown to make sure an integer is the entered result.

Since the searchfield is a textbox, the user can enter an alpha string and then get an ugly error on the search

How do I make sure only integers can be entered into the searchfield ?

I tried this :


        private void bdExchanges_InitializeSearchFields(object sender, EventArgs e)            {            bdExchanges.SearchFields["From_Date"].InitialValue = DateTime.Today.ToString();            bdExchanges.SearchFields["Thru_Date"].InitialValue = DateTime.Today.ToString();            // this searchfield has override data type set to Int32 in BD Searchfields properties UI            bdExchanges.SearchFields["ReutersExchangeID"].FieldType.Equals(SqlDbType.Int);                        }


but that does not seem to be the answer?

Eddy, you can be my hero again ( and this time I'll pay attention BigGrin )
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