Thats weird. My code worked completely fine without the portion mentioned in this question and I haven't bound anything from my original question code to anything on the XAML so I'm confused....
My guess would be that one of those two fields in NULL for at least one record
That is not the case here, I've checked that.
I've also added the below detailed error which I'm struggling to figure out, maybe you can help me fix or better understand it
at...
I have the following SQLite database table
When I load the WPF app I run the ff() method shown below
public static string dbloc = @"Data Source=MYDATA.db";
internal static SQLiteConnection GetConnection() { return new SQLiteConnection(dbloc);}...
But how do I apply it in my case ? I've tried
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=eName}" Width="260">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>...
Yes, I do see data in my data grid.
BTW, I've wrongly typed public string eHead1 = @"Name"; instead of public string billHead1 = @"Name"; in my previous post.
Here is my XAML for data grid
<DataGrid
SelectedItem="{Binding SelectedEmp, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding FilteredEmps}"
SelectionMode="Extended"
AutoGenerateColumns="False"
IsReadOnly="True"
SelectionUnit="FullRow"...
I get your point.
Actually in my XAML I have the set datagrid AutoGenerateColumns="False" & then added the columns like
<DataGrid.Columns>
<DataGridTextColumn
Header="Name"
Binding="{Binding Path=eName}" />
<DataGridTextColumn
Header="Full Address"...
What I mean is that the header of the datagrid column has some text in it, say the datagrid has 3 columns "Name", "Address" & "Age", I want to get those text dynamicall and use it. As far as I know in mvvm I simply cannot use like
foreach (DataGridColumn column in gridView.Columns)
Are you...
I want to iterate through a datagrid header column and get its values to a variable, something like
foreach (DataGridColumn column in gridView.Columns)
{
var cell = column.Header.ToString()
}
How can I do this following mvvm?
Well, the intellisense doesn't show me the option of EmpSalary inside the ToDecimal portion
So, I think I need to do this using a different approach but not sure what ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.