datagridtextcolumn

DataGridTextColumn.MaxLength?

How do I set the MaxLength property of the DataGridTextColumn? ...

How to retrieve TextBlock from DataGridColumnHeader HeaderStyle in Silverlight

As in Silverlight I can't bind directly to a DataGridColumn's property, in order to dynamically change the text of the column header, I have to write the following code using HeaderStyle. <data:DataGridTextColumn.HeaderStyle> <Style TargetType="dataprimitives:DataGridColumnHead...

DataGridTemplateColumn for individual control-column vs DataGridTextColumn

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 > ...

How do I detect when a cell's value has changed in Silverlight?

Hey folks, I'm working in Silverlight, trying to figure out how to set a grid cell font color based on the contents of the cell. I have an ObservableCollection bound to a DataGrid, and my items implement INotifyPropertyChanged so the grid updates as I change the values; it's all working perfectly, including letting me sort items and ke...

WPF datagridtextcolumn - always show textbox

Hello, By default the WPF datagridtext appears as a label and enters an edit state upon clicking. Is there a way to modify the column so that the textbox is always visible (instead of depending on the click event)? Thanks in advance, JP ...

Inheriting from DataGridTextColumn and overriding GenerateElement

I'm attempting to create a custom DataGrid where I can format individual cells based on the cell value (ie; red text for negative values, green for postitive) ala this approach... http://stackoverflow.com/questions/686165/how-to-get-binding-value-of-current-cell-in-a-wpftoolkit-datagrid I also need to convert the values from negative t...

Silverlight DataGridTemplateColumn vs. DataGridTextColumn

Why does this work... <data:DataGridTemplateColumn Header="YTD v. Exchange" x:Name="YTDvExchange" Visibility="Collapsed" CanUserSort="True" SortMemberPath="ytdExchangeReturn.value"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock TextAlignment=...

Validate DataGridTextColumn with ValidatesOnExceptions=True after converting data from String to Integer

Hi, I have a WPF DataGrid With a Text Column. DataGrid is binded with a LIST<> and DataGridText Column is binded with a String Property but the value in this property can be only Numeric. But the Numeric validation on the DataGridTextColumn can't happen with the String value. So i have converted the value from String to Integer using a ...

WPF question regarding the binding inside of DataGridTextColumns

Hello, Today I noticed a strange behavior regarding binding the header of a DataGridColumn to the ViewModel. The following binding works perfectly (name of the DataGrid is MyGrid): <DataGridTextColumn Binding="{Binding Name}" Width="*" CanUserReorder="False" CanUserResize="False" IsReadOnly="True"> <Da...

WPF: How to bind a numeric property to DataGridTextColumn?

I thought it should be a simple thing for WPF, but I can't make it work... I have an int property (Divisions) on my class and I want to bind it to a DataGrid column. <DataGrid AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="Number of Divisions" Binding="{Binding Path=Divisions, StringFormat={...