About the Southridge_Labs

May 11, 2013 at 12:18 PM
How can I get the DatePicker Control from selected DataGridRow from dg1(DataGrid Control)?
I need this, because I want to get the SelectedDate.Value, from DatePicker control, and then, to modify in the database in the same time(when SelectedDateChanged Event was occurred).

Also, for the Rating Control too. How to get which row (from dg1) was clicked, and then what cell in that row, and finally, what value(rating from 0 to 5), have that cell (Rating Control Template).

Some code without using binding, will be much appreciated!

Thanks in advance!
May 12, 2013 at 1:07 PM
I don't need help anymore! I always work alone! :)
After some tries, I realized that the DatePicker Control have some bugs, because when I say:

DatePicker dp = (sender as DatePicker); // the sender is from DatePicker_SelectedDateChanged event

, the dp is null.

So, I replaced the DatePicker control from WPFToolkit, with DatePicker from System.Windows.Controls (native control).

And for the RatingsControl, just I added (in the xaml), the RatingsControl_MouseLeftButtonUp event, and in the code behind,
I get the rating value = (sender as RatingsControl).Rating.

And then, the updating to db...

Who needs more help, just ask :)

Stay safe!