I'm not sure if im using the correct event but let me explain whats happening.
i have a gridview control which display data/images. When a image is changed it fires the cellformating event to play a audio sound, but when i click on the row or cell on the grid it fire the cellformatting event again. Why is this happening?is this by design. I only want to play the audio when the image value changes.
Thanks in advance!
i have a gridview control which display data/images. When a image is changed it fires the cellformating event to play a audio sound, but when i click on the row or cell on the grid it fire the cellformatting event again. Why is this happening?is this by design. I only want to play the audio when the image value changes.
Thanks in advance!
4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 06 May 2009, 09:23 AM
Hi Michael,
The CellFormatting event is fired whenever a cell changes its visible state. Therefore, even when you scroll your grid, this event is fired many times for each cell that becomes visible even for a moment.
Shinu.
The CellFormatting event is fired whenever a cell changes its visible state. Therefore, even when you scroll your grid, this event is fired many times for each cell that becomes visible even for a moment.
Shinu.
0
Hello Michael,
Shinu is right, this is not the proper event to implement your scenario. Thank you Shinu for being active community member -- I have updated your Telerik points.
Since images cannot be changed using the grid directly, you must have some external control and logic for changing them (e.g. a button next to the grid), so you can implement the sound effect there.
You can use the event below to track changes in grid rows:
Do not hesitate to write me back if you have further questions.
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Shinu is right, this is not the proper event to implement your scenario. Thank you Shinu for being active community member -- I have updated your Telerik points.
Since images cannot be changed using the grid directly, you must have some external control and logic for changing them (e.g. a button next to the grid), so you can implement the sound effect there.
You can use the event below to track changes in grid rows:
private void radGridView1_RowsChanged(object sender, Telerik.WinControls.UI.GridViewCollectionChangedEventArgs e) |
{ |
if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged) |
{ |
} |
} |
Do not hesitate to write me back if you have further questions.
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Michael
Top achievements
Rank 1
answered on 08 May 2009, 02:02 PM
Ok...I'm using the Rowschanged event but its not firing at all! The data has changed in the row and it should fire everytime data changes. Also by using this event i need to find out what column and data value triggered the change.
0
Hi Michael,
Well you cannot tell which column(cell respectively) was changed. You can only get information about which rows have been changed, but you have to change the picture in code so you probably know that information. Please send us some code so we can help you further with that.
Best wishes,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Well you cannot tell which column(cell respectively) was changed. You can only get information about which rows have been changed, but you have to change the picture in code so you probably know that information. Please send us some code so we can help you further with that.
Best wishes,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.