Trying to implement "intellisense"

K

Katit

Hi!

I need to develop aid for City/State Entry. I'm planning on having
list of cities in dataset and user would have those pop up while
typing. Kind of like what Excel does when you type in column something
that already was entered in same column

After each charachter entered/deleted - I will evaluate text before
cursor and throw first city that mach "enteredtext%". Then I will
select text after cursor keeping cursor in same position.

At least this is how I plan on doing it.

What I'm looking for - ideas.Maybe I'm trying to reinvent wheel and
things like that already in framework.

If it matters - data will be entered into DataGridView. There is many
thouthands of cities and I don't want to load bunch of comboboxes.
Maybe creating one combobox will do?Just position it in needed spot?

I'm open to suggestions. Thanks!
 
P

Peter Duniho

[...]
What I'm looking for - ideas.Maybe I'm trying to reinvent wheel and
things like that already in framework.

If it matters - data will be entered into DataGridView. There is many
thouthands of cities and I don't want to load bunch of comboboxes.
Maybe creating one combobox will do?Just position it in needed spot?

I think actually that's not such a bad approach. Having a proxy data
entry control is not an unusual implementation at all. I agree that
making a lot of ComboBox controls would be wasteful, but if they are all
supposed to behave the same and the user of course can interact with only
one at a time, putting a single ComboBox wherever you need it at the
moment the user is entering data should work fine.

If you have multiple columns like Excel and want each ComboBox to act
according to data in the column, you could have one ComboBox per column.

Getting it to look just right might require some fiddling, but I think
it'd be simpler than, like you said, reinventing the wheel. Assuming, of
course, that the ComboBox data entry matching behavior is what you want.

Pete
 
K

Katit

I think actually that's not such a bad approach.  Having a proxy data  
entry control is not an unusual implementation at all.  I agree that  
making a lot of ComboBox controls would be wasteful, but if they are all  
supposed to behave the same and the user of course can interact with only  
one at a time, putting a single ComboBox wherever you need it at the  
moment the user is entering data should work fine.

If you have multiple columns like Excel and want each ComboBox to act  
according to data in the column, you could have one ComboBox per column.

Getting it to look just right might require some fiddling, but I think  
it'd be simpler than, like you said, reinventing the wheel.  Assuming, of  
course, that the ComboBox data entry matching behavior is what you want.

Pete


I found something even better. .NET textbox has Autocomplete*
properties which do exactly what I wanted.
I will just override textbox cell type with this one..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top