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. Image for the cookie policy date

Error edit with filter datagrid

Good morning!

I have a error with grid when filter. when i no do the filter, I can put the focus in the filed and edit the value without problem, but when i filter and try to edit the second o other distinct to the first, throw a exception.


The code of grid is this:

 <syncfusion:SfTextBoxExt x:Name="txtSearch" Grid.Column="0"

                                 TextChanged="txtSearch_TextChanged" Watermark="Escriba texto a buscar..." VerticalAlignment="Center" ShowClearButton="True" />

        <syncfusion:SfDataGrid x:Name="gvPersons" HorizontalContentAlignment="Center"

                               AllowEditing="True" AllowDeleting="True"

                               ScrollMode="Async" CanMaintainScrollPosition="True" LiveDataUpdateMode="AllowDataShaping"

                               AddNewRowPosition="Top" AddNewRowText="Inserte nueva persona"

                               AllowResizingColumns="True" AllowFiltering="True" ColumnSizer="Star"

                               AutoGenerateColumns="False" EditTrigger="OnTap" ShowRowHeader="True"

                               RowValidated="gvPersons_RowValidated"

                               RowValidating="gvPersons_RowValidating"

                               RecordDeleted="gvPersons_RecordDeleted"

                               RecordDeleting="gvPersons_RecordDeleting" Grid.Row="1">

            <syncfusion:SfDataGrid.SortColumnDescriptions>

                <syncfusion:SortColumnDescription ColumnName="name" SortDirection="Ascending"/>

            </syncfusion:SfDataGrid.SortColumnDescriptions>

            <syncfusion:SfDataGrid.Columns>

                <syncfusion:GridTextColumn MappingName="id" IsHidden="True" />

                <syncfusion:GridTextColumn MappingName="name" HeaderText="Nombre" />

            </syncfusion:SfDataGrid.Columns>

        </syncfusion:SfDataGrid>


then the code of filter is this:

 private void txtSearch_TextChanged(object sender, TextChangedEventArgs e)

        {

            gvPersons.SearchHelper.AllowFiltering = true;

            gvPersons.SearchHelper.Search(txtSearch.Text);

        }

finally the error is this:

System.InvalidOperationException: ''System.Windows.Documents.Run' no es un Visual ni un Visual3D.'



4 Replies 1 reply marked as answer

SP Sreemon Premkumar Muthukrishnan Syncfusion Team May 1, 2023 02:38 PM UTC

Hi Ricardo,


We are a little unclear about your replication procedure. We have prepared a sample based on our understanding and your code snippet, but we were unable to replicate the reported issue. Could you please share the exact replication procedure and error call stack along with the video illustrations?. This will be helpful for us to check on it and provide you with a solution at the earliest.


Please find the attached sample that we have prepared.


Attachment: SfDataGridDemo_c_b358c5b0.zip


RI Ricardo May 1, 2023 05:24 PM UTC

Hi!

I have created a example, I'm working with C# WPF core, in the example, i create a database in sqlite, you can follow the next steps:

1 Run app

2 search merca

3 click on row mercadona

4 click on row mercafruta goyo

5 if it works, try to click on others rows


I attach screens


Attachment: Demo_b8bc1521.zip



AK Arunachalam Kandasamy Raja Syncfusion Team May 2, 2023 10:25 AM UTC

Hi Ricardo,

 

Thanks for contacting Syncfusion support.

 

The reported issue "SfTextBoxExt throws System.InvalidOperationException: 'System.Windows.Documents.Run' is not a Visual or Visual3D" in WPF is a known issue. We already fixed this issue. This fix will be included on May 9th, 2023. We appreciate your patience until then.

 

Kindly get the fixed Assembly and Nuget using the link provided below. If you require any further information, please do not hesitate to let us know.

 

Assembly version: 21.1.35

 

Assembly Link:  https://syncfusion.com/Installs/support/patch/21.1.35/1116105/T456007/SyncfusionPatch_21.1.35_1116105_4192023060922438_T456007.zip

 

Nuget :

https://syncfusion.com/Installs/support/patch/21.1.35/1116105/T456007/SyncfusionNuget_21.1.35_1116105_4192023060922438_T456007.zip

 

Disclaimer:

Please note that we have created this patch for version 21.1.35 specifically, to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.

 

Note: Please refer to the below link to apply the custom assembly

 

https://www.syncfusion.com/kb/8279/how-to-apply-the-custom-assemblies-when-configured-the-project-with-syncfusion-nuget

 

Note: Please clear the NuGet cache, before using the latest one.

 

https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

 

Regards,

Arunachalam K


Marked as answer

AK Arunachalam Kandasamy Raja Syncfusion Team May 31, 2023 05:11 AM UTC

Hi Ricardo,

 

Thanks for your patience. 

 

We have included the fix in our latest weekly NuGet release v21.2.8 which is available for download ( https://www.nuget.org/ ). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.

 

Regards,

Arunachalam K


Loader.
Live Chat Icon For mobile
Up arrow icon