I am trying to move custom DataGrid column definition into a UserControl.
MyComboBoxColumn.xaml
<dg:DataGridTemplateColumn
x:Class="WpfDecomposition.MyComboBoxColumn"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dg="clr-namespace:Microsof...
I am using Microsoft WPF datagrid. I have noticed a strange behavior with WPF datagrid DataGridTemplateColumn. When you use the templateColumn in the grid and the template column contains some controls when you tab from the previous column the focus is not automatically given to the first element declared in the template column. The fouc...
There's the usual Gridview with template column
<ItemTemplate>
"lbOpen" Text='Select' runat="server" OnCommand="lbOpen_Command"
CommandName="open" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "OrderID") %>' />
Unexpectedly and by unknown reason "lbOpen_Command" ceased to fire.
After stop at page OnInit() breakpoi...
Hello everyone,
I created a DataGrid, that utilizes customized data cells using the DataGridTemplateColumn.CellTemplate directive. I placed a textblock inside with the Text field using a Binding to one of the ItemSource members. As the content of that member differs between "Green", "Yellow" and "Red".
Everything works fine. The Foregro...
I'll keep it short, is there any way to define a set of DataGridTemplateColum's and not have their width be static (such as my values 300, 130 and 900 below)? "*", and "Auto" throw exceptions.
I want to have the datagrid be scalable. That is, when the user resizes their browser (it's a Silverlight App), there is not an ugly edge to the ...
Hi.
I want to set the sorting of a WPF DataGridTemlpateColumn to a property of one of the child members in the row.
For instance, the DataGrid's ItemsSource is an Array of computers, each of them has a screen, each screen has a button.
I want the sorting should be {Binding Screen.Button.Name}.
How do I do that?
...
Hi,
I am implementing a file upload tool using Silverlight. In this I can browse for files and when I select a file then it is bound to a datagrid. In the datagrid I have a template column with a button to delete the particular item from the datagrid and ItemSource of the datagrid which is a List<>.
I have a class UploadedFiles as belo...
It seems like no matter what i do, i get AG_E_PARSER_PROPERTY_NOT_FOUND when trying to bind a property in DataGridTemplateColumn in silverlight. I've even tried tried the following
<data:DataGridTemplateColumn dataBehaviors:DataGridColumnBehaviors.BindableTextOverride="{Binding ElementName=LayoutRoot,
...
Hi;
sorry if I'm not clear, it's not really clear in my head too (especially after trying to find my way in other posts :p)
What I'm willing to do is creating DataGrids in code, with zero to numerous columns containing a button, which will call one same function but with a "parameter" (different for each column).
Here is what I got so...
Hello,
when I d*ouble-click* - or click once when its already focused - below the items in a empty area of the Listbox which is within my DataGridTemplateColumn then I get the above error message.
WHAT do I wrong?
This is my Code:
<DataGridTemplateColumn Width="0.3*" Header="Attachments">
<DataGridTemplateColumn.CellTemplate>
...
Hi,
Ive got an ObservableCollection<string> list, which is bound to a combobox. This combobox is in a datatemplate which is inside a 'DataGridTemplateColumn'.
When the datagrid is displayed (with all the rows), the column displaying this combobox works just fine. The user can select the items in the combobox, and when it's selected, t...
Hello,
what is the difference, both works: DataGridTemplateColumn versus DataGridTextColumn
both works means I can edit+display rich text in the cell.
<DataGridTemplateColumn Header="Homework">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<RichTextBox >
...
Hi
I have a wpf datagrid containing multiple datagridtemplatecolumns, which all are build up from a datatemplate which contains a textbox.
Now I want to get the binding of the textbox (I have a reference to the template column which textbox's binding I woukld like to determine).
Alternatively it would be nice to return the X:Name of ...
Hi all,
I'm trying to customize the column headers of a DataGrid to show sub-column headers as in the following screenshot:
I've made a style for 2 sub-column as in the following XAML:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:data="clr...
Hi,
I am trying to get the name of the property associated with a particular DataGridColumn, so that I can then do some stuff based on that. This function is called when the user clicks context menu item on the column's header...
This is fine for the out-of-the-box ready-rolled column types like DataGridTextColumn, since they are boun...
I am using a WPF DataGrid where one of the columns has a requirement to show an "Edit" hyperlink if the row is editable - this is indicated by a boolean flag in the backing model for the row. I was able to achieve this using a DataGridTemplateColumn - no problems. However an additional requirement on the entire row is not to show any hig...
I have a WPF Toolkit DataGrid with one DataGridTemplateColumn. I've specified in a grid attribute that I wish all columns to be sortable, but the DataGridTemplateColumn won't allow it. All other columns do allow sorting. I've even tried explicitly setting CanUserSort to true for that column, but no luck. Is it even possible to sort a tem...
Hello everyone.
I need to bind an enum to a combobox that is inside a DataGridTemplateColumn, but only some of the options that the enum has.
Example:
Enum options:
Unknow, One, Two, Three, Four, All
Bindable ones: One, Two, Three, Four
Any way to do this?
Many thanks.
Best regards
...
I want to center the header on a Silverlight DataGridTemplateColumn. The following code gets me most of the way there:
DataGridTemplateColumn column = new DataGridTemplateColumn();
column.CellTemplate = Resources[templateName] as DataTemplate;
column.Header = headerName;
column.HeaderStyle = new Style { TargetType = typeof(DataGridColum...
I have a DataGridTemplateColumn on a WPF DataGrid which has a binding to a double type. I wish to apply a Storyboard Animation when the value goes down and another Storyboard Animation when the value goes up. I've got the following code to start with:
<dg:DataGridTemplateColumn Header="My Double">
<dg:DataGridTemplateColumn.CellTemp...