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

PART_IndicatorPresenter not working

5 Answers 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adriano
Top achievements
Rank 1
Adriano asked on 15 Feb 2013, 12:45 PM
HI,

I have a project whith version "2012.2.0725.1050" and I had to format my machice, and installed version "2012.3.1129.1050" but the first line of code now is retuning null:

               
Border indicatorPresenter = row.ChildrenOfType<Border>().Where(b => b.Name == "PART_IndicatorPresenter").FirstOrDefault();
indicatorPresenter.MouseLeftButtonDown +=
new MouseButtonEventHandler(indicatorPresenter_MouseLeftButtonDown);

 Do you have any other solution?

Thanks,
Adriano.

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 15 Feb 2013, 01:13 PM
Hi Adriano,

May I ask you to share what your final goal is? Why do you need to get this border? 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Adriano
Top achievements
Rank 1
answered on 15 Feb 2013, 01:38 PM
Hi Didie,

I did this so I could have SelectionMode=Cell and when user click on presenter it changes to Row.

If I'm not mistaken I used this post as a source: http://www.telerik.com/community/forums/silverlight/general-discussions/row-indicator-with-selectionmode-cell.aspx.

Can't I have this part working instead of change my code?

Thanks,
Adriano.
0
Dimitrina
Telerik team
answered on 15 Feb 2013, 01:58 PM
Hello Adriano,

Actually we have introduced such feature out-of-the-box with our current official release Q3 2012 SP1. All you need to do is set SelectionUnit property of the grid to be "Mixed".  Does this solution work for you?

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Adriano
Top achievements
Rank 1
answered on 27 Feb 2013, 08:19 PM
Hi,

I'm on the final tests for this feature, we implemented as you told, but we have a problem.

If user press CTRL + A and then press Delete, the whole grid is going to be deleted (as it happens here: http://demos.telerik.com/silverlight/#GridView/Commands), but once the user does the same process, GridView should only delete/clean data not delete the rows.

Is this possible?

Thanks,
Adriano.
0
Adriano
Top achievements
Rank 1
answered on 01 Mar 2013, 07:24 PM
I just found what caused this, I changed from CanUserDeleteRows="True" to CanUserDeleteRows="False", and now it's working as expected.

Thanks,
Adriano Gaspar.
Tags
GridView
Asked by
Adriano
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Adriano
Top achievements
Rank 1
Share this question
or