I want to declare a DataContext through a static resource in XAML as a binding for the Customers in the Northwind database. I can do this easily in code (C#) but want to learn how to do in XAML. I have tried all of the examples I can find but none of them work for me. I believe the issue is in the two XAML lines of code I have labeled [O...
I'm really hoping someone can help me out here. I have a DataGrid in my program that has a checkbox column. The ItemsSource for the DataGrid is a DataSet loaded programmatically. When I select a couple of items in the DataGrid and then scroll it, I get some very odd behavior. For example, when I check two of the CheckBoxes, it tells me t...
Hi All,
Another question to you guys. This time it is about data grid.
We have a kind of requirement in silvelright where we need to make some columns editable and others not editable. This order might be changed based on user preferences. Now when the grid is in inline editing mode, i have two problems
1) Tabbing out of cells in sing...
I need to get the exact DataGridColumn that is associated with the DataGridColumnHeader. So, basically: fill in the gaps in the following code: :)
DataGridColumnHeader myHeader; // this is a given value
DataGridColumn myColumn = SomeCoolMethod(myHeader);
public DataGridColumn SomeCoolMethod(DataGridColumnHeader header)
{
// ???
}
...
Greetings,
In an WPF DataGridTemplateColumn I have a CellTemplate using a ListView and a CellEditingTemplate using a DataGrid.
<DataTemplate x:Key="LimitsTemplate">
<ListView ItemsSource="{Binding Limits}" IsEnabled="False">
<ListView.ItemTemplate>
...
</ListView.ItemTemplate>
</ListView>
</DataTem...
I need to create a reusable DataGrid column with a custom CellTemplate. This CellTemplate should, among other things, contain a TextBlock control to which I need to bind values to display in the DataGrid. All examples I've seen so far specified the CellTemplate for a column directly when using it in a DataGrid's Columns property and also...
Hi there,
This is hopefully going to be a really simple answer, I'm just not seeing the proverbial wood for the trees I think.
I've got a DataGridCell style in which I want to bind the content of the cell to the source property of an image, here's the XAML I'm using at the moment:
<Style x:Key="DataGridImageCellStyle" TargetType="{x:T...
Is there a way to add a 2nd header row to a DataGrid? In the row I want a DropdDownList and a Label. Right now I have a BoundColumn and a TemplateColumn in my Columns section of the grid. But adding something here will only add column, but not a header.
It should look like this:
This is my label text: dropdownlist --> first row of head...
I have created a custom style for my WPF datagrid by overriding its control template - nothing unusual, just copied the original template and modified it. Unfortunately, when the grid is drawn, the fully qualified class name of my ViewModel is showing up in the header (the ViewModel happens to be the DataContext of the UserControl that c...
Hey everybody,
I'm completely new to C# and ASP and got added to a pretty big project so I'm in a bit over my head and kind of intimidated/terrified. Note: This project uses VS 2003, .NET framework 1.1, not really sure about C# version. So we have DataGrid, no DataGridView.
I have a button that performs an operation on the currentl...
Hello,
I have a column with long user comments. I load it using following code...
<my:DataGridTextColumn Header="Message"
Binding="{Binding UserMessage, Mode=OneWay}"
CanUserSort="True">
<my:DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBlock}"
...
Using Release WPF DataGrid I am trying to bind to the property of a CellViewModel (that supports INotifyPropertyChanged of course). I am binding the DataGrid's ItemsSource to an ObservableCollection of type RowViewModel (which is inherited from Dr.WPF's ObservableDictonary) of type CellViewModel and I want bind to a property of a CellVie...
Hi
I am looking for a SL DataGrid to buy that deals with a few main issues that I found annoying in the regular toolkit control.
I am not using RIA or WCF Data services. I intend to perform the actual paging in the SQL query. I just Need a control that will let me override the functionality of its pager.In other words - let me insert ...
I have a few frozen columns in my WPF DataGrid. When I scroll, horizontally, the RowHeader is also scrolling, instead of staying frozen. Is there something I can do to keep it from scrolling horizontally? I can provide more information if needed.
...
I have several combobox choices which a user can select from on a WPF window. Each of those compbo boxes are bound to different tables through EDMX. The combos do not bind to eachother.
I'm looking for a master/detail functionality. When a user selects anyone of the combobox selections(master) a query results(details) built from the sel...
I'm creating a table that displays information from a MySQL database, I'm using foreignkeys all over the place to cross-reference data.
Basically I have a datagrid with a column named 'system.' The system is an int that represents the id of an object in another table. I've used lableFunction to cross-reference the two and rename the co...
When you create a RowDetailsTemplate in a Silverlight grid you can specify a template for row details that is shown directly below the row when it is selected.
The details I have for one of my datagrids would look a lot better immediately before each individual row, rather than after it.
I've tried modifying the template in Blend, but ...
I am using Wpf Toolkit DataGrid. Whenever I assign Itemssource to it, its first item get selected and its selectionChanged event gets called. How can I stop it to select any row by default?
...
I'm a bit new to the DataGrid control in WPF. I've built a DataGrid into a UserControl, and wrapped that UserControl in a Window. The DataGrid:
<DataGrid x:Name="mDataGrid" RenderTransformOrigin="0.167,-0.077" Margin="-2.572,0,5.428,0" IsReadOnly="True" AlternatingRowBackground="#1EA2A2E2" AutoGenerateColumns="False" Height="389" ...
I'm just finding my way with WPF/Datagrid/Linq and I'm trying to find out how to display data from a related table in my datagrid. For example I have 3 tables:
Customers: id, name
Products: id, name
Orders: id, customerId, productId
and I've set up the relations in the DB tables. I've added the tables as a C# DataSet which has cre...