Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Column.Visible Bug

Page 1 of 2 (16 items)   1 2 Next >
Sort Posts: Previous Next
  •  02-16-2007, 5:45 AM Post no. 6905

    Column.Visible Bug

    Hello I found a nother bug:
    I added some code to support showing and hiding columns.
    at first I add code to showall and hideall:

    internal void HandleShowHideAllColumns(bool visible)
    {
    foreach (Column column in grid.Columns)
    {
    column.Visible = visible;
    }
    }

    try this and u'll see that the hide works but when I hit show all again the rows are hidden in a weired way.

    Itzik
  •  02-16-2007, 9:27 AM Post no. 6906 in reply to 6905

    Re: Column.Visible Bug

    There effectively seems to be a bug there... Thanks for reporting this. We'll try to fix this issue in an upcoming version.
    Marc Laroche
    Software Developer
    Xceed Software Inc.


    I don’t suffer from insanity, I enjoy every minute of it. - Unknown
  •  02-19-2007, 11:39 AM Post no. 6907 in reply to 6906

    Re: Column.Visible Bug

    FYI I am doing a similar thing, but rather than showing or hiding columns, I add and remove them and it works fine

    <xcdg:DataGridControl Name="servicesList" ItemsSource="{Binding Path=Services}" AutoCreateColumns="False" ReadOnly="True" NavigationBehavior="RowOnly">

    <xcdg:DataGridControl.Resources>
    <syscollections:ArrayList x:Key="AdvancedColumns">
    <xcdg:Column FieldName="Statistics.WhenLastPublished" Title="Last Published" DisplayMemberBinding="{Binding Path=Statistics.WhenLastPublished, Converter={StaticResource DateTimeConverter}}" Width="100" />
    <xcdg:Column FieldName="Statistics.YieldSetCount" Title="Yield Sets" DisplayMemberBinding="{Binding Path=Statistics.YieldSetCount}" Width="100" />
    <xcdg:Column FieldName="Statistics.WeightingSetCount" Title="Weighting Sets" DisplayMemberBinding="{Binding Path=Statistics.WeightingSetCount}" Width="100" />
    <xcdg:Column FieldName="Statistics.PublishingSetCount" Title="Policies" DisplayMemberBinding="{Binding Path=Statistics.PublishingSetCount}" Width="100" />
    <xcdg:Column FieldName="Statistics.LivePublishingSetCount" Title="Published or Live Policies" DisplayMemberBinding="{Binding Path=Statistics.LivePublishingSetCount}" Width="150" />
    </syscollections:ArrayList>
    </xcdg:DataGridControl.Resources>

    <xcdg:DataGridControl.Columns>
    <xcdg:Column FieldName="ServiceIdentifier.ServiceBrand" Title="Brand" DisplayMemberBinding="{Binding Path=ServiceIdentifier.ServiceBrand}" Width="70" />
    <xcdg:Column FieldName="ServiceIdentifier.ServiceNumber" Title="Number" DisplayMemberBinding="{Binding Path=ServiceIdentifier.ServiceNumber}" Width="70" />
    <xcdg:Column FieldName="Description" Title="Description" DisplayMemberBinding="{Binding Path=Description}" Width="300" />
    <xcdg:Column FieldName="Statistics.WhenLastModified" Title="Last Modified" DisplayMemberBinding="{Binding Path=Statistics.WhenLastModified, Converter={StaticResource DateTimeConverter}}" Width="100" />
    </xcdg:DataGridControl.Columns>
    <xcdg:DataGridControl>

    Then in the codebehind

    ArrayList advancedColumns = (ArrayList) servicesList.FindResource("AdvancedColumns");

    if ((bool) e.NewValue)
    {
    // Add the advanced columns to the grid
    foreach (Column column in advancedColumns)
    {
    serviceList.servicesList.Columns.Add(column);
    }
    }
    else
    {
    // Remove the advanced columns from the grid
    foreach (Column column in advancedColumns)
    {
    serviceList.servicesList.Columns.Remove(column);
    }
    }
  •  02-20-2007, 9:55 AM Post no. 6908 in reply to 6907

    Re: Column.Visible Bug

    thanks
  •  05-16-2007, 10:24 AM Post no. 6909 in reply to 6908

    Re: Column.Visible Bug

    This issue has been resolved, you can obtain the latest version <a href="http://download3.xceedsoft.com/Packages/3.0.7264.16200/XceedComponents.exe">here</a>


    Mathieu Drimonakos
    -Technical Designer-
  •  08-03-2008, 4:21 AM Post no. 13848 in reply to 6906

    Re: Column.Visible Bug

    Hi,

     I am trying to bind the  IsChecked property of a checkbox to the Visible property of a column in the data grid.  This XAML doesn't seem to work.

    <xcdg:Column FieldName="Freight" Visible="{Binding ElementName=chkBox, Path=IsChecked}" />

     Doesn't anyone know how to do something like this?

  •  09-08-2008, 8:10 PM Post no. 15048 in reply to 13848

    Re: Column.Visible Bug

    I am trying to do this as well and I just cannot get it to work. Is this a bug? Is the visibility being overridden sometime later after the binding?

     

  •  09-18-2008, 7:11 PM Post no. 15423 in reply to 15048

    Re: Column.Visible Bug

    Anyone? Is this not possible?
  •  09-19-2008, 8:50 AM Post no. 15441 in reply to 13848

    Re: Column.Visible Bug

    Do you have any binding errors in the output window?
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  09-21-2008, 8:35 PM Post no. 15473 in reply to 15441

    Re: Column.Visible Bug

    Yes (now that I look)

    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=IsChecked; DataItem=null; target element is 'Column' (HashCode=44247136); target property is 'Visible' (type 'Boolean')

    Does this help at all? Is it a scope issue? The grid is inside a Tab Control but I have tested putting another checkbox in the tab and binding its checked state to the same source and that works ok!

     

  •  09-22-2008, 10:04 AM Post no. 15497 in reply to 15473

    Re: Column.Visible Bug

    This is normal behavior since columns are not in the visual tree. This post (http://www.drwpf.com/Blog/Default.aspx?tabid=36&EntryID=36) on Dr.Wpf explains why.
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  09-23-2008, 1:40 AM Post no. 15528 in reply to 15497

    Re: Column.Visible Bug

    By "normal behavior" do you mean then that it is not possible?
  •  09-23-2008, 8:28 AM Post no. 15536 in reply to 15528

    Re: Column.Visible Bug

    Correct. This is not possible.
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  09-23-2008, 11:09 PM Post no. 15577 in reply to 15536

    Re: Column.Visible Bug

    Hmmm. So can you give any hints on how to achieve this? Styles on the column, DataTriggers etc? I can change the Visible property in the code behind but I want it bound to the data.
  •  09-24-2008, 8:48 AM Post no. 15592 in reply to 15577

    Re: Column.Visible Bug

    It is not possible to style a column because it is not a FrameworkElement. Unfortunately, I do not have a solution to provide you with.
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
Page 1 of 2 (16 items)   1 2 Next >
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.