Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi Every one

I'm trying to pick a date from date and time picker, as a result the date will be inserted into a datagrid cell or column. I was able to do it with a textbox but I have no idea how to do it with a datagrid.

Please help.

  • Moderators
Posted

you can do something like this...

Datagrid1.Item(Datagrid1.CurrentCell.RowNumber, _
       Datagrid1.CurrentCell.ColumnNumber) = _
       calendar1.SelectionStart.ToLongDateString

Or set a couple of member variables to make sure that the user

actually selected a cell. You can do this in the DataGrid1_CurrentCellChanged event.

m_nSelectedCell = Datagrid1.CurrentCell.ColumnNumber
m_nRowNumber = Datagrid1.CurrentCell.RowNumber
'so you would check the value of these variables prior to 
'assigning any values to them (so they don't crap-out)

Visit...Bassic Software
  • 2 months later...
  • Moderators
Posted
Eric, did you even try? Please open a new thread if you have a specific question as this one is a few months old and JAM has not been on for over a month.
Visit...Bassic Software
Guest
This topic is now closed to further replies.
×
×
  • Create New...