We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl and ItemContainerStyle

Thread ID:





107805 Mar 18,2013 05:02 PM UTC May 8,2013 03:39 AM UTC WPF 4
Tags: GridControl
Charalampos Kouris
Asked On March 18, 2013 05:02 PM UTC


I have a standard WPF-DataGrid like this:

<DataGrid Name="dgEmployee" AutoGenerateColumns="True" IsReadOnly="True"     SelectionMode="Single" ItemsSource="{Binding Employee, NotifyOnSourceUpdated=True}">            <DataGrid.ItemContainerStyle>
        <Style TargetType="{x:Type DataGridRow}">
            <Setter Property="caliburn:Message.Attach"
                        Value="[Event MouseDoubleClick] = [Action OpenChild($executionContext)]"/>

When I double click on a row, then in my ViewModel the OpenChild(Employer emp) method is called and the row context is given as argument . These works thanks to the Caliburn Micro framework.

Now I of course would like to use the Syncfusion-GridDataControl but obviously it does not have an ItemContainer like the standard one or I can't find it. What is the equivalent part of the GridDataControl, is it possible to style it like that? I have a workaround but it's not the best solution and I still try to go via styling the "ItemContainer".

Thanks in advance

Charalampos Kouris
Replied On March 18, 2013 10:14 PM UTC

Hallo again,

I forgot to mention that I've already made some tries for example with RowStyle:

<syncfusion:GridDataControl Name="gdcEmployee" ItemsSource="{Binding Employee}" ShowGroupDropArea="True" ShowAddNewRow="False" AllowDelete="False" AllowEdit="False"   AllowSelection="None" EnableBlendStyling="True" ActivateCurrentCellBehavior="None">
        <Style TargetType="{x:Type syncfusion:GridDataRowControl}">
            <Setter Property="caliburn:Message.Attach"
                Value="[Event MouseDoubleClick] = [Action OpenChild($dataContext)]"/>                

But unfortunally no success so far.


Rajasekar G [Syncfusion]
Replied On April 2, 2013 04:38 AM UTC

Hi Charalampos,


Thank you for contacting Syncfusion support.

We have analyzed your query and we have achieved your requirement by using the following code snippet. 


Code Snippet[C#]:

<syncfusion:GridDataControl x:Name="SyncGrid" 

                            SelectedItem="{Binding SelectedItem}"

                            syncmvvm:GridDataControlCellClickCommandWithEventArgs.Command="{Binding SelectedItemChanged}" 





                            ItemsSource="{Binding GDCSource}" >  


For your reference, we have also prepared the sample based on your requirement and please find the sample in the below location,

Sample: GridDataControlSample.zip


Please let us know if you have any queries.



Charalampos Kouris
Replied On April 18, 2013 07:41 AM UTC

Hi Rajasekar,

thanks for you answer. Unfortnately this is not exact what I've asked for. Question was if the Syncfusion-GridDataControl has something like an ItemContainer and, if yes , how is it possible to style this. I already have an easy solution with binding the selected item but I wanted to try on the other way.

Anyway, thanks a lot for your answer and showing me something new.


Rajasekar G [Syncfusion]
Replied On May 8, 2013 03:39 AM UTC

Hi Charalampos, 

Sorry for the delay.

At present there is no support for ItemContainerStyle API in GridDataControl. You have to use the Style and GridDataStyleManager in GridDataControl to apply style in the GridDataControl

Please let us know if you have any questions.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon