views:

756

answers:

3

hi all

is there any way to merge cells in a datagrid view or atleast can we show on the screen like some columns in the grid belongs to one group.

for example ill take three columns: column1: year field(a drop down type) column2: month field(a drop down type) column3: date field(a drop down type)

all these three should be grouped to dateofbirth cell.

or is there any way to embed calendar component in the cell.. just like in some sites when we book some tickets we click on calendar icon & click the date and it will be captured in the corresponding field..

any ideas?

A: 

You can create your own DataGridViewCalendarColumn by inheriting from DataGridViewColumn, and a DataGridViewCalendarCell by inheriting from DataGridViewCell or DataGridViewTextBoxCell.

This isn't something I've done myself, but there are loads of tutorials online explaining how to create custom DataGridView columns. A google search may help.

GaryJL
A: 

what i have done for this is as follows:

i have taken a date time picker obj,which will be in invisible mode initially. when i focus on the date of birth cell ,then date time picker will invoke(in a dialog) and will be visible for this focus time. after selecting the date,the value will be inserted into the current cell. if the focus is on the next rows and the corresponding cell then once again we follow the above step.

srinivas
A: 

You can use a third-party DataGrid like this one: http://www.viblend.com/products/net/windows-forms/controls/gridview.aspx

akshay kumar