Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 !

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*
Posted

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

"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
Posted

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...