TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kumartyr
NA
55
27.8k
how to do autocomplete for date in textbox in required formt
Aug 13 2013 1:26 AM
i have a form in which am displaying data in datagridview from DB & i also have a textbox in which am able to autocomplete strings of other columns and search in datagridview and get the matching data filtered and displayed in datagridview but not able to do that for date column
how to do autocomplete for date alone [not with time] in textbox in required format "dd-mm-yyyy" and fetch the matching date column to display in datagriview
i have tried the below code but it doesn't works
AutoCompleteStringCollection ACSCVV = new AutoCompleteStringCollection();
OLCMND3 = new OracleCommand("Select to_date(to_char(TODAYDATE, 'dd-mm-yyyy'),'dd-mm-yyyy HH:MI:SS') as TODAYDATE from TABLENAME order by NUMBER asc", CON);
DR1 = OLCMND3.ExecuteReader();
if (DR1.HasRows == true)
{
while (DR1.Read())
{
ACSCVV.Add(DR1["TODAYDATE"].ToString());
}
}
else
{
MessageBox.Show("No Data Present In The Database");
}
DR1.Close();
TypeHereTextBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
TypeHereTextBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
TypeHereTextBox.AutoCompleteCustomSource = ACSCVV;
Reply
Answers (
3
)
Send button id from one form to another in windows app
declare multiple class members in single access specifier