Questions tagged [datagridtemplatecolumn]

Represents a DataGridColumn customizable implementation

Learn more about DataGridTemplateColumn on MSDN.

275 questions
0
votes
1 answer

Accessing selected value of a Combobox in DatagridTemplateColumn from Code behind

My Binding for the combobox in datagridtemplatecolumn is working fine but I am not able to access the selected value of the combobox from code behind on the selection changed event. I suppose there is some problem with ContentPresenter which is not…
Afaq
  • 1,146
  • 1
  • 13
  • 25
0
votes
0 answers

Template column automatically hides during postback

On the initial load of this page my template column, in an asp data grid, displays fine. When I click any controls that force a post back the data grid reloads with the template column hidden. There is no visible attribute being set in the html.…
0
votes
1 answer

Why is my DataGridTemplateColumn and RadioButton not visible in my DataGrid?

Why I don't see a column with a RadioButton in the DataGrid?
user231605
  • 159
  • 1
  • 3
  • 10
0
votes
2 answers

Using a DataGridTemplateColumn to display a button or an image

I have a list of mail I generate, and displayings some details into a dataGrid. Some will works, some will be in errors. I want to display, into the last datagrid column, a button, if the process successed, or an image if the process failed. So, I…
provençal le breton
  • 1,428
  • 4
  • 26
  • 43
0
votes
1 answer

How do you apply an AlternatingItemStyle to a specific DataGrid TemplateColumn?

I've got a datagrid with 3 TemplateColumns, each containing a HeaderTemplate and an ItemTemplate. I put in a HeaderStyle, ItemStyle and AlternatingItemStyle for all 3 columns (so outside of the tags. I then decided I want to apply a different…
sr28
  • 4,728
  • 5
  • 36
  • 67
0
votes
1 answer

DataGridTemplateColumn InvokeCommandAction Template

I'm using a UserControl where the main control inside is a datagrid. All is working. However, some lines of my code are redundant since I implement the same trigger in each of the 48 columns. How do I make a template for the datagridtemplatecolumn…
eemwingg
  • 15
  • 7
0
votes
1 answer

Set 2 type controls(TextBox and ComboBox ) in same DataGridTemplateColumn in XAML

I have a DataGrid. Inside it contains some columns; 2 are related to this question, one is a DataGridTextColumn(x:Name="varTypeColumn") which show Variable type, another is a DataGridTemplateColumn(x:Name="varValueColumn") which could be a TextBox…
0
votes
1 answer

Strange behaviour of ASP.NET DataGrid ItemCommand event

I use a DataGrid only programmatically. Public Class MyOwnDataGrid Inherits MyBaseClass Private DataControl As New WebControls.DataGrid Public Property DataSource as DataTable = Nothing Public Sub New() AddHandler…
mburm
  • 1,417
  • 2
  • 17
  • 37
0
votes
1 answer

Create ToolTip on Silverlight DataGridTextColumn that is different from the bound cell contents

I have a DataGridTextColumn in a Silverlight 4 DataGrid and I want to set a ToolTip value on the column that is different from the bound value. I know I can do this with a templated column quite easily - but it adds a huge amount of extra XAML and…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
0
votes
1 answer

dynamic width for DataGridColumnTemplate

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…
Erik Kerber
  • 5,646
  • 7
  • 38
  • 56
0
votes
2 answers

Display DataGrid Column as Hyperlink Column depending on column value

I have the below DataGrid which works with no problem
ShufflerShark
  • 377
  • 1
  • 4
  • 20
0
votes
1 answer

Is there a code-behind equivalent for TextBlock ScrollViewer.CanContentScroll="True" for DataGridTemplateColumn?

For a TextBlock in XAML, you can do the following inside a DataTemplate: But…
Bob.
  • 3,894
  • 4
  • 44
  • 76
0
votes
1 answer

Hide linkbutton in Datagrid templatecolumn for the first row only

I'm trying to hide the "Delete" linkbutton in the datagrid for the first row only, but would like to display "Delete" linkbutton button in rest of the rows. How can i achieve that, any help is much appreciated.
0
votes
1 answer

DataGridTemplateColumn using ContentPresenter in HeaderStyle

I am using couple of DataGridTemplateColumns in my XAML DataGrid, each one of which is group of text boxes, since I wanted a grouped header layout for the columns (e.g. merged columns as headers in excel). All of this works fine, since I am using…