Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DataGridViewCell Caledar - Possible for one cell but not the whole column

Posted on 2008-10-02
2
Medium Priority
?
168 Views
Last Modified: 2013-11-26
I have a datagrid view that needs to display a Caledar Drop Drop (Date Time Picker is OK) withing a single cell, but NOT for the entire column.  Is this possible?  If so, can someone suggest how.  

I got the calendar column working from this MSDN article.  
http://msdn.microsoft.com/en-us/library/7tas5c80.aspx
but I need to prevent the calendar from displaying in every cell within the column

Thanks

Tim
0
Comment
Question by:timconway
2 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 22629763
You cannot do that if you implement a CalendarColumn. It will be present on every row.
If you really need that you can place a datetimepicker (by code) hover the cell and then use the selected value to fill the cell.
Check this example that I have helped http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_23746465.html. It uses a combobox but you can get the idea.
0
 

Author Closing Comment

by:timconway
ID: 31502641
Thanks for clearing that up for me.  I had a feeling I'd have to use the old VB6 'smoke and mirrors' approach, which actually works just fine.  I just wasn't sure if the DataGridView could get that detailed on the cell level or not.  And since I'm not quite ready to shell out for a Third Party grid, looks like this will be the way to go.  

Thanks for your help

Tim
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question