I have a need to sense (event?) when a date cell is changed from a date to null. The way I'm changing from a date to null is: 1) Select the cell (the column is always in edit mode). 2) Press the Delete key.
I would also like to sense any time a Date changes.
Hello,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Hi Yanko,
As you can tell, I'm new to using the XamGrid.
If it's too much trouble, disregard my request for a Silverlight 4 version of your last sample. I think I got the gist of it by looking at the source code: looks like you declared a handler for the DatePickerTextBox's KeyUp event by setting it within the Style's xaml. Is there a reason you did it that way instead of declaring it in code? The reason I ask is that I see in the documentation of the DatePicker's Members an event named KeyUp. Is there a way I can use that instead of having to go in and modify the control's Style?
Please bear with me, I'm just trying to get a better understanding of how the Grid works and how to work with the Grid.
I think I can accomplish my objective using the SelectedDateChanged event or maybe I should use the LostFocus event because I'm thinking maybe that's when the change actually is committed. How can this be implemented? Do I have to modify the DatePicker's template?
Is there a document, white paper, walkthroughs or anything else you can recommend for gaining a more in depth understanding of XamGrid. The documentation is good, but I feel a need for something maybe at a higher level that pulls it all together and gives a more conceptual understanding of why (or, at least how)things work the way they do.
Any additional insight will be greatly appreciated.
Thanks,
Joe
Thank you very much for the additional information. I'm in process of trying to digest it all now. I'm taking a closer look at the Samples Browser. So far, I haven't seen an example (except for yours) that demonstrates how to gain access to internal control events / Properties, etc.
Thanks again I do appreciate your help,
I have created the same sample application(XamGridS4DateColumn.zip) for Silverlight 4. I have handled the ‘KeyUp’ event of the DatePickerTextBox because the ‘KeyDown’ event is handled internally in the source code of the DatePickerTextBox in order to delete the text when the ‘Delete’ key is pressed. I have declared a handler for the DataPickerTextBox’s ‘KeyUp’ event in Style because in Silverlight there are no EventSetters or Triggers and this approach was the most appropriate in my opinion. I have used ‘KeyUp’ event because your requirement was to get notified when the date is deleted by pressing the ‘Delete’ button.
We do not provide any other text information about our controls except our online documentation. If you would like to look through other interesting points of our XamGrid, I can suggest you take a look into our Feature Browser.
If you have any other questions, feel free to ask.