To follow my previous post here => Binding SelectedItem of ComboBox in DataGrid with different type
I have now a datagrid containing 2 columns, one with a text, the other with a combobox (in a datatemplate, written thru the C# code, not the Xaml).…
I have a DataGrid that contains several DataGridTemplateColumns.
My problem is that the currently selected row will turn some of the cells foregrounds to white, i.e. make the text white.
DataGridTemplateColumns that contain TextBlocks behave…
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-columns as in the following…
Hi I have a datagrid that has a number of datagridtemplate columns that are all identical apart from they each have a different datacontext on the template's stackpanel.
…
when I double-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:
I am working on a Silverlight application which makes an extensive use of Prism, the MVVM pattern and MEF. For several reasons, I have chosen to follow a View-first approach.
In one of the Views there is a DataGrid, and one of the columns of this…
I have a DataGridTemplateColumn. Inside its CellEditingTemplate, I put a DatePicker control. Now if I want to edit the date, I have to click three times to let DatePicker begin editing. Can someone let me know how I can get DatePicker into edit mode…
I'd like to add my custom control into a template column of data grid.
The custom control is very similar to a text box, but has an icon in it. The user can click the icon, and selects an item from a prompted window, then the selected item will be…
BitmapImage im = new BitmapImage();
string path1 = @"C:\abc.png";
im.UriSource=new Uri(path1);
DataGridTemplateColumn one = new DataGridTemplateColumn();
this.dataGrid1.Columns.Add(one);
Now i have to add the BitmapImage im in the…
The question:
Is there a way to define a DataTemplate in XAML and instantiate it in code (rather than retrieve singleton by FindResource) and modify its VisualTree before sending to where a DataTemplate is required such as…
I need to create a common DataGridTemplateColumn, so that I can use it across my application with different objects and properties.
here is some sample code, I use in my project
…
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…