Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Custom DataGridView Columns and Cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Guy Thornton - 25 Jul 2006 21:18 GMT
Hi,

I have an application with a DataGridView that displays a Questionnaires
questions and allows a user to fill in answers to these questions in the
gridview.

Each question knows its questionType (Date, Text, or Yes/No/Na).  I have
created a custom column that inherits from datagridviewcolumn and have
created a custom cell that inherits from DataGridViewTextBoxCell.

In my cell object, I get the OwningRow.DataBoundItem to reference the
QuestionObject and then Get the QuestionType of the question in that row.

After I do this, I use a select case statement to determine the type of
editing control I need for Edit purposes.  This way, Date questions get a
datepicker edit control, YES/NO/NA questions get a combobox edit control and
Text questions get a text box edit control.

I have my DataGridView displaying the correct type of editing controls when
edit mode is entered on the cell.  And my Text Box and DatePicker Edit
controls seem to be working right as well.  

I am having a problem with the ComboBox edit control for my custom cell.  
Even though I specify the Items list for the combobox, when the combobox is
displayed, none of the items show up in the dropdown and even if I type an
answer in the combobox, it doesn't enter edit mode.

There are also some other strange behaviors going on in terms of values
displayed when entering edit modes and in display mode.

I would really appreciate any help here I can get.  This has been a big
problem for me to solve and have gotten close, but not yet complete.

Thanks so much in advance for your help.
Guy
Guy Thornton - 26 Jul 2006 20:59 GMT
If anyone is willing, I can provide my code so you could see what is going
on.  Like I mention below, it almost works completely, but I am having
problems making the ComboBox cells behave correctly.

I am really in need of some help.  I have tried everything I can think of to
make this work.  Any help is greatly appreciated.

> Hi,
>
[quoted text clipped - 31 lines]
> Thanks so much in advance for your help.
> Guy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.