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.
Unfortunately, activation email could not send to your email. Please try again.

Syncfusion Data Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

116028 Mar 19,2014 08:16 AM Jan 19,2015 07:45 AM WinRT 6
loading
Tags: SfDataGrid
Arpita
Asked On March 19, 2014 08:16 AM

Hi 

I am facing an issue regarding Syncfusion DataGrid. I have used data grid view in 3 pages of my project. The issue is when I am trying to execute the project,it is getting crashed and showing an exception called Null Reference Exception. Here is the exception 

System.NullReferenceException: Object reference not set to an instance of an object.\r\n  at Syncfusion.UI.Xaml.Grid.GridHeaderCellControl.OnPointerExited(PointerRoutedEventArgs e)

I have nowhere implemented this method called OnPointerExited. Still it is throwing exception

Here is my Code Snippet-

----XAML Page---

<SFGrid:SfDataGrid x:Name="ListData" BorderThickness="1" Margin="0" Height="270" AutoGenerateColumns="False" 
                                                       ColumnSizer="SizeToHeader" ScrollViewer.VerticalScrollBarVisibility="Auto" VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled" AllowSorting="False" 
                                                       BorderBrush="Transparent" AllowGrouping="False" SelectionMode="Single"   
                                                       HeaderStyle="{StaticResource HeaderCell}"   
                                                       AllowDeleting="False" NavigationMode="Row" AllowRowHoverHighlighting="True"
                                                       Padding="5" Visibility="Visible" Background="White" 
                                                       SelectionChanged="ListData_SelectionChanged">
                                    <SFGrid:SfDataGrid.Columns>
                                        <SFGrid:GridTextColumn HeaderText="CATEGORY" MappingName="name" Width="450" TextAlignment="Left" HorizontalHeaderContentAlignment="Left"/>
                                        <SFGrid:GridTextColumn HeaderText="SUB-CATEGORIES" MappingName="categories" Width="175" TextAlignment="Center"/>
                                        <SFGrid:GridTextColumn HeaderText="THREADS" MappingName="threadCount" Width="150" TextAlignment="Center" HorizontalHeaderContentAlignment="Center"/>
                                        <SFGrid:GridTextColumn HeaderText="POSTS" MappingName="messageCount" Width="100" TextAlignment="Center" HorizontalHeaderContentAlignment="Center"/>
                                        <SFGrid:GridTemplateColumn HeaderText="ACTIONS" Width="150" HorizontalHeaderContentAlignment="Center" TextAlignment="Center" >
                                            <SFGrid:GridTemplateColumn.CellTemplate>
                                                <DataTemplate>
                                                    <StackPanel Width="50" Background="Black" VerticalAlignment="Center" HorizontalAlignment="Center">
                                                        <ComboBox x:Name="CategoryAction"  Foreground="White" Width="20" SelectionChanged="CategoryAction_SelectionChanged" DataContext="{Binding categoryId}">
                                                            <ComboBox.Background >
                                                                <ImageBrush ImageSource="/Assets/nav.png"   />
                                                            </ComboBox.Background>
                                                            <ComboBoxItem Background="#4d4d4d" Tag="Edit">
                                                                <StackPanel Orientation="Horizontal">
                                                                    <Image Source="/Assets/edit_2.png" Width="15"></Image>
                                                                    <TextBlock Foreground="White" Margin="6,0,0,0">Edit</TextBlock>
                                                                </StackPanel>
                                                            </ComboBoxItem>
                                                            <ComboBoxItem Background="#4d4d4d" Tag="Delete">
                                                                <StackPanel Orientation="Horizontal">
                                                                    <Image Source="/Assets/delete.png" Width="15"></Image>
                                                                    <TextBlock Foreground="White" Margin="6,0,0,0">Delete</TextBlock>
                                                                </StackPanel>
                                                            </ComboBoxItem>

                                                        </ComboBox>
                                                    </StackPanel>
                                                </DataTemplate>
                                            </SFGrid:GridTemplateColumn.CellTemplate>
                                        </SFGrid:GridTemplateColumn>

                                    </SFGrid:SfDataGrid.Columns>
                                </SFGrid:SfDataGrid>

----CS Page---
// Assigning ItemSource to the data grid
mbctrgy = await MessageManager.GetAllCategories();
if (mbctrgy.Count != 0)
                {
                    ListData.ItemsSource = mbctrgy;
                }


// getting which row is to be selected
 private void ListData_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e)
        {
            try
            {
                if (ListData.SelectedItem != null)
                {
                    category_id = ((LN2Entities.Model.Forum.MBCategory)(ListData.SelectedItem)).categoryId;
                    if (category_id != 0)
                    {
                        string category_name = ((LN2Entities.Model.Forum.MBCategory)(ListData.SelectedItem)).name;

                        viewSubCategoryList(category_id, category_name);
                    }
                }
            }
            catch { }



        }

Except this there is no method related to datagridview was implemented anywhere. Please help me regarding this issue.Waiting for you reply.

Thanks in advance.


Ashok N [Syncfusion]
Replied On March 20, 2014 07:12 AM

Hi Arpita,

Sorry for the inconvenience caused.

We are unable to reproduce the reported issue. We have tested the reported issue by creating simple sample but we couldn’t get any Exception. We have attached our sample in the below location. Could you please revert us by modifying the sample based on your application? This would be more helpful for us to serve you.

Sample Link: http://www.syncfusion.com/uploads/user/directTrac/120163/winrtsample-1211715240.zip

Please let us know if you have any queries.

Thanks,

Ashok


Arpita
Replied On March 20, 2014 10:18 AM

Thanks for such a quick Reply Ashoke.
I was not able to execute your project,it is showing cannot resolve windows metadata.

Arpita
Replied On March 20, 2014 10:21 AM

I am also not getting the error everytime I execute the project. Rarely it is showing.But when the error occurs my app is getting crashed. Also I am developingWindows Store App with Caliburn Micro Framework. 

Ashok N [Syncfusion]
Replied On March 24, 2014 02:17 AM

Hi Arpita,

Sorry for the inconvenience caused.

We have downloaded and tested the attached sample but we didn’t face any error. However, can you please remove the assembly and add correct version of assembly installed in your machine and run the sample?  Else, share the simple sample based on your application that will help to reproduce the issue and would be more helpful for us to serve you.

Please let us know, if you have any queries.

Thanks,

Ashok


Syed Najmuddin Asif
Replied On January 16, 2015 03:05 PM

Hi,

Even I'm getting this error, this is not something we can reproduce as it is comes very rarely but it does crashes the app. 

Thanks,
Syed Asif

Ashok N [Syncfusion]
Replied On January 19, 2015 07:45 AM

Hi Syed Asif,

We are sorry about the inconvenience caused.

We have analyzed your query but we are unable to reproduce the reported issue. We have tested the reported issue with previously updated sample using product version 12.4 but we couldn’t get any Exception in the time of project execution. We have tested this query in many times but we didn’t face any exception. We have attached our sample in the below sample location. Could you please revert us by modifying the sample based on your application? This would be more helpful for us to serve you.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/116028/Headerbinding-1167626170.zip

Please let us know, if you require further assistance.

Thanks,

Ashok



CONFIRMATION

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.

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.

;