FrozenColumnCount in Xaml vs. Code-Behind

5 posts, 1 answers
  1. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 15 Dec 2009 Link to this post

    Hi Telerik,
       I am not sure if this is a known issue or if I miss something. It seems that the FrozenColumnCount in Xaml does not work at all. But when I set the FrozenColumnCount in code-behind, everything works as expect. I just wonder if this is a bug or not.

    Thanks,
    Karlkim
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 16 Dec 2009 Link to this post

    Hello Karlkim,

     Everything works fine on our online demo: http://demos.telerik.com/silverlight/#GridView/FrozenColumns


    All the best,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 16 Dec 2009 Link to this post

    Hi Vlad,
       I did look at the demo and the code. 

    In the Xaml, it has something like this. The FrozenColumnCount is on the far right.

     <Controls:RadGridView x:Name="RadGridView1" ItemsSource="{Binding Customers}" IsFilteringAllowed="False" AutoGenerateColumns="False" UseAlternateRowStyle="True" HorizontalAlignment="Center" FrozenColumnCount="2" MaxWidth="750"
     

    When you preview it, the first two columns are not frozen at the beginning. But when you use the slider to change FrozenColumnValue (The slider's value has a two-way binded to FrozenColumnCount), it will work fine.

    Maybe the RadGridView ignore the initial value in Xaml? 

    Thanks,
    Karlkim
  5. Answer
    Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 16 Dec 2009 Link to this post

    Hello Karlkim Suwanmongkol,

    I believe it is a known bug in RadGridView. We are trying to fix it for the very next service pack .

    A manifestation of the bug is that the problem appears depending on the order you set the AutoGenerateColumns and the FrozenColumnsCount attributes in XAML .

    If you swap their places in XAML ( e.g. move the ForzenColumsCount in XAML  before the other attributes)  it will fix the issue for the moment.

    Please excuse us for the inconvenience caused.

    Greetings,
    Pavel Pavlov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 23 Dec 2009 Link to this post

    Hi Pavel,
       I reordered the attributes, and it fixed the issue.

    Thanks,
    Karlkim
Back to Top
DevCraft banner