ultraman Posted April 29, 2003 Posted April 29, 2003 PLEASE SOMEONE HELP ME :( :( It's been a while now, and I'm realy getting sick of these components !! I have a DataGrid with 2 columns and one with a ComboBox in. Since there's a ComboBox, the Cell needs to be editable, but I don't wanna let people write anything in it !! Thje problem is that I cannot make the Combo appears 100% of the time... The CurrentCellChanged Event isn't always raised. So I need something either to prevent people from editing the Cell, or to make shure the f***ing ComboBox appears ALWAYS. The code I used to implement the ComboBox in the DataGrid is based on the one in the FAQ document on this forum. Thanks ! Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
*Experts* Nerseus Posted April 29, 2003 *Experts* Posted April 29, 2003 Which implementation are you using? this FAQ mentions 4 versions and all work differently. Maybe you could post the code you're using for the ComboBox control and for a sample form so that we can help. And, are you just trying to set the DropDownStyle to DropDownList so that they can't type, or are you trying to JUST use the combo to always be read-only so that you can bind to a foreign key relationship (bind to ID in one table, show a description from another)? -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
ultraman Posted April 30, 2003 Author Posted April 30, 2003 Sorry for the delay, I just got your answer. Here's the sample I used for the ComboBox implementation. By the way, I just added an event Handler (for the KeyPress) on the Cell AND on the Combo. This way I can just put e.Handled = True and it works just fine. The DataGrid is powerful, but tricky, it really needs a little time to get used to it.combo datagrid sample.zip Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.