开发者

How to make the second grid to occupy the position of the first when it is collapsible in WPF

开发者 https://www.devze.com 2023-02-15 05:43 出处:网络
I have some wpf gridviews(presenting only two here) <igDP:XamDataGrid x:Name=\"dgSummary\" GroupByAreaLocation=\"None\"

I have some wpf gridviews(presenting only two here)

<igDP:XamDataGrid
        x:Name="dgSummary"   
        GroupByAreaLocation="None" 
        ScrollingMode="Immediate"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        DataSource="{Binding Path= SummaryData}" 

    Grid.Row="1" 
    Grid.Column="0"
Visibility="Hidden"
        >


<igDP:XamDataGrid
        x:Name="dgEquity"   
        GroupByAreaLocation="None" 
        ScrollingMode="Immediate"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        DataSource="{Binding Path= EquityHoldingsData}"
        Grid.Row="3" 
        Grid.Column=开发者_JAVA技巧"0"

>

What I intend to do is that, I want to set the visibility property of the first grid to Hidden and thereby want to display only he second grid. It does happen so. But the problem is that, the area occupied by the first grid is present. I want to make the second grid to occupy the first grid's position when the visibility is set to hidden or collapsible.

How to do this?

Also thee are other grids. So say if I make the visibility of 2nd , 5th grid to hidden, then the other grids should occupy their areas.

I am using infragistics control.


Got it.... Visibility="Collapsed"


You can set both control's Grid.Row and Grid.Column value to same to occupy both in same position then make hidden one.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号