This is a migrated thread and some comments may be shown as answers.

[Solved] Manipulating Row Indicators

2 Answers 145 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Philip
Top achievements
Rank 1
Philip asked on 27 Jul 2009, 07:50 PM
Hello,

Today I have an issue with manipulating the contents of the Row Indicator column. The functionality we need is to insert an asterisk (*) inside the Row Indicator cell whenever the row is edited, effectively created a marked for unsaved changes.

I can manage to do this by inserting code into the Cell Edit Ended event that. I collect the IndicatorPresentor using ChildrenOfType on the row, and insert a simple textblock into the IndicatorPresentor's Content property.

The problem is that this only works sometimes. If I do not do any actual editing to the cell, the indicator will change as appropriate. If I do change the cell, however, the normal triangle indicator shows up. Stranger, if this occurs, any other asterisks inserted into other Row Indicator cells dissapear as well.

It seems as though all the indicator rows are being reset upon row edit. This happens not just if insert a textbox, but even if I change the background color as well. I was wondering if you had a way to get around this, or if this was indeed an issue with Radcontrols and not my grid itself.

Thank you for your time,

Philip Coffey

2 Answers, 1 is accepted

Sort by
0
Philip
Top achievements
Rank 1
answered on 28 Jul 2009, 12:40 PM
This issues has been partially resolved (it was our code, not the controls), but this has presented a further problem to us. Now the problem being presented to us is that inserting a textblock into the indicator cell through the Content property seems to cause an exception that ultimately originates from MS.Internal.XcpImports.VisualStateManager_GoToState(Control reference, String StateName, Boolean useTransitions), and occurs after around the third row edit or so.

So I my question is revised thusly: what is the most effective and safe way to change the contents of the indicator cell such that it doesn't cause instability?

Thanks to everyone for their help.
Philip Coffey
0
Kalin Milanov
Telerik team
answered on 31 Jul 2009, 08:15 AM
Hello Philip,

I am sending you a sample application in which I have placed a TextBlock inside the IndicatorCell to show an asterisk. The tricky part is to name the TextBlock to NavigatorIndicator so that the visual states which handle the visibility will work.

From what I gather from your posts you have managed to show the indicator when you enter edit mode so ultimately the sample should handle your case.

Let me know if you need any further assistance.

Best wishes,
Kalin Milanov
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.
Tags
GridView
Asked by
Philip
Top achievements
Rank 1
Answers by
Philip
Top achievements
Rank 1
Kalin Milanov
Telerik team
Share this question
or