Skip to main content

All Questions

Tagged with
0 votes
1 answer
151 views

WPF: DataGrid not expanding to occupy both columns of Grid when second column content is collapsed

I have a Grid which has two columns, first column has a DataGrid and second column has another grid. I expect DataGrid to expand to take full space when Visibility of second grid is set to 'collapsed'....
A. Trivedi's user avatar
0 votes
1 answer
193 views

DataGrid RowDetails Visibility on RowDoubleClick

In my Datagrid xaml I set the rowdetailsvisibilitymode to collapsed. Then I created an event on RowDoubleClick to collapse and expand the details of a row when the row is double clicked: private ...
Angela 's user avatar
0 votes
1 answer
778 views

WPF Visibility Binding Column in a DataGrid

I have a DataGrid where I am trying to control the visibility of each column. Everything works fine when I bind the source of the column to the actual ViewModel, but I've read that the column should ...
mjordan's user avatar
  • 369
0 votes
2 answers
235 views

Edit cells in DataGrid with hidden rows

In WPF I have a DataGrid with some Collapsed rows. When I edit a cell and then press enter, if the next row is collapsed then the selection doesn't move to the next visible row. Instead a dotted ...
amnesyc's user avatar
  • 5,311
0 votes
1 answer
295 views

Show/Hide all datagrid columns from datacontext wpf

I need to change the Datagrid columns visibility from context menu inside the header. All the columns visibility were set inside the XAML code by default. <DataGridTextColumn Visibility="Visible" ...
IBRA's user avatar
  • 1,692
1 vote
2 answers
2k views

Wpf DataGrid hide rows when checkbox is true and bound data is true [duplicate]

I want to disable visibility(collapse) of certain rows when a checkbox is checked and the bound data that is on that row matches certain criteria. for example(pseudo code): If(...
user2311703's user avatar
0 votes
1 answer
3k views

Binding visibility to bool value in WPF dataGrid

I am aware that as DataGrid columns aren't part of the Visual Tree, you can't bind the visibility property of the columns directly to a boolean property in your VM. You have to do it another way. ...
user3161050's user avatar
5 votes
1 answer
2k views

Setting Visibility of Datagrid rows to Collapsed seems to break scrollbar?

I have a Datagrid containing items as List, one property in this custom list is a bool which determines visibility (the visibility can be toggled by a checkbox). I have that working as this: <...
Sakuya's user avatar
  • 680
0 votes
1 answer
385 views

Setting visibility of stacked item on a datagrid [closed]

I'm attempting to show either a textbox or a button in a stack panel on a datagrid, based on a drop down in a different column in a WPF datagrid. Below is the basic code. The actual implementation ...
Robert Fleming's user avatar
0 votes
3 answers
110 views

Hide a usercontrol present in Datagrid

I have a usercontrol which I am including in my datagrid column. But I want to hide that usercontrol on the basis of certain condition. I tried binding the visibility of that usercontrol but that is ...
Vishal's user avatar
  • 614
99 votes
4 answers
66k views

Binding Visibility for DataGridColumn in WPF

How can I hide a column in a WPF DataGrid through a Binding? This is what I did: <DataGridTextColumn Header="Column header" Binding="{Binding ColumnValue}" ...
ygoe's user avatar
  • 19.8k
0 votes
1 answer
184 views

Prevent sorting in datagrid from resetting rows visibility property

Is there a way to prevent DataGrid sorting to reset rows visibility? I tried re-setting visibility in "Sorting" event with no luck. Rows appear to have correct visibility but when GUI draws all rows ...
no9's user avatar
  • 6,534
0 votes
2 answers
2k views

Columns Visibility for xceed DataGridControl

I have an xceed:DataGridControl with bounded ItemsSource. Currently I'm trying to set my in/visible columns and the title/headertext for each visible column. Preferably I would like to bind a property ...
peter70's user avatar
  • 1,103
0 votes
1 answer
230 views

Set one property visible at a time in a Grid row in WPF

I have a Grid which has multiple rows. In First row of my grid I have a DataGrid to show some content when my Tree is clicked. If there is no content to the value clicked in the TreeView then NO-...
BinaryMee's user avatar
  • 2,132
4 votes
1 answer
2k views

Binding programmatically generated DataGridTextColumn's Visibility property to a checkbox

I'm trying to bind the visibility property of a DataGridTextColumn to the IsChecked value of a combo box (cbIP). For most columns, I have solved the problem in XAML with lines like this: <...
SamiHuutoniemi's user avatar

15 30 50 per page