question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi All.

I was using the nuget package in .NET Framework 4.7.2 and it was working fine. I then migrated the project to .NET 6 and then the gird no longer appeared. I’m not sure if it is because I am using .NET 6 or if I am doing something wrong, but any help would be much appreciated.

My current code: XAML:

xmlns:control="http://filterdatagrid.control.com/2021"
...
<control:FilterDataGrid x:Name="filterGrid" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2"></control:FilterDataGrid>

XAML.CS:

...
filterGrid.DataContext = viewModel;
filterGrid.ItemsSource = viewModel.Contracts;
filterGrid.AutoGeneratedColumns += (_, _) =>
{
     filterGrid.Columns.RemoveAt(0);
     filterGrid.Columns.Move(10, 0);
     filterGrid.Columns.Move(13, 0);
     filterGrid.Columns[0].Header = "Contract (JobID)";
     filterGrid.Columns.RemoveAt(7);
     filterGrid.Columns.RemoveAt(13);
     filterGrid.Columns.RemoveAt(13);
     filterGrid.Columns.RemoveAt(13);
     filterGrid.Columns.RemoveAt(13);
};

Contracts is a IEnumerable<Contract> which is loaded before this code.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
huantingchencommented, Aug 11, 2022

Same problem. 1.2.5 is okay. 1.2.6 is not working.

0reactions
macgilecommented, Dec 3, 2022

Hi all,

The problem with loading probably stems from where and when you feed the “ItemsSource” property of FilterDataGrid . FilterDataGrid works the same way as a Datagrid. If you don’t implement INotifyPropertyChanged to notify that the “ItemsSource” property has been updated, use the “Loaded” event of FilterDataGrid to do further processing on the columns. Here is an example :

// MainWindows.cs List<User> items = new List<User> { new() { Name = “John Doe”, Mail = “test_1@mail.com”, Age = 42, Sex = SexType.Male }, new() { Name = “Jane Doe”, Mail = “test_2@mail.com”, Age = 39, Sex = SexType.Female }, new() { Name = “Sammy Doe”,Mail = “test_3@mail.com”, Age = 13, Sex = SexType.Male }, new() { Name = “Donna Doe”,Mail = “test_4@mail.com”, Age = 13, Sex = SexType.Female } };

filterGrid.ItemsSource = items;

        filterGrid.Loaded += (_, _) =>
        {
            filterGrid.Columns.RemoveAt(3);
            filterGrid.Columns.Move(1, 0);
            filterGrid.Columns.Move(2, 1);
            filterGrid.Columns[0].Header = "Contract (JobID)";
        };

// test class public enum SexType { Male, Female };

public class User { public string Name { get; set; }

public int Age { get; set; }

public string Mail { get; set; }

public SexType Sex { get; set; }

}

Please see the demo applications provided with the code of FilterDataGrid.

Best regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connected to internet but nothing's loading?
My laptop was running fine, but for a couple days it starting acting up. It says that I'm connected but it doesn't load...
Read more >
Nothing loading in windows 10
Hi, i have recently been having an issue with my pc were nothing will load. Every time my pc starts acting up i...
Read more >
Nothing is loading on my iPhone 11
Out of no where, nothing on my iPhone 11 is loading. I have tried turning it all the way off, resetting the network...
Read more >
Nothing loading even with bars : r/verizon
Like my phone will say I have several bars, whether LTE or 5G, but it just won't load stuff and keeps spinning. Turning...
Read more >
Why Is Nothing Loading On My Phone? (4 Likely Reasons!)
One of the most common reasons as to why nothing is loading on your phone is a lack of internet connectivity, either due...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found