I am binding my Data Table to a data grid via ItemsSource
.
If any column name contains either a left or a right parenthesis, it's throwing some exception i.e
An error occurred while dispatching a call to the UI Thread
am using MVVM Pattern.
Here is the Xaml Code
<DataGrid x:Name="bindedItems" Grid.Row="1" ItemsSource="{Binding BindedItems}" SelectionMode="Extended"/>
Here is the C# Code
this.BindedItems = new DataTable();
this.BindedItems = table;
table columns are like this
Right Parenthesis)
testing
Lest Parenthesis(
and from that column skipping remaining columns.
How to handle these type of exceptions and how to skip these type of columns from UI?
Please give me any suggestion to handle these things.