How do I handle SelectionChanged event of a calendar in a data grid

  • Thread starter angel ko via .NET 247
  • Start date
A

angel ko via .NET 247

I have two image buttons and a calendar control at a data grid. The calendar control was invisible initially. When the userclicks one of the image buttons, the calendar control will bedisplayed. I would like a selected date to be displayed on theedit box in a cell of the data grid right after the user selectsa date,. However, I have a trouble to catch the calendar?sSelectionChanged event in a data grid. The calendar control isstored in a ?Template Column?. I wish that I could catch theCalenar1_SelectionChanged(object sender, System.EventArgs e) asif this calendar control is outside of data grid.

If I stored the calendar control outside of the data grid, Icould not catch the edit box?s handle by using((TextBox)e.Item.FindControl("txtAddFromDate")).Text. NOTE: e isdefined as DataGridCommandEventArgs.

Calenar1_SelectionChanged(object sender, System.EventArgs e): eis defined as System.EventArgs.

So, I don?t know how to handle this case. Would you pleasehelp?

I would very appreciate if anybody could provide me a solution. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top