Problem in RowLoadedEvent

9 posts, 0 answers
  1. Simon yang
    Simon yang avatar
    15 posts
    Member since:
    Sep 2009

    Posted 24 Oct 2009 Link to this post

    private void grdItemsOnLoan_RowLoaded(object sender, RowLoadedEventArgs e)
          {
             if (e.Row is GridViewHeaderRow || e.Row is GridViewNewRow)
                return;

             if (e.DataElement != null)
             {
                IItemsOnLoan dp = (IItemsOnLoan)e.DataElement;
                if (dp != null)
                {
                   if (dp.Today == 0)
                      e.Row.Foreground = new SolidColorBrush(Colors.Blue);
                   else
                      e.Row.Foreground = new SolidColorBrush(Colors.Black);
                   if (dp.dDuedate < DateTime.Today)
                   {
                      e.Row.Foreground = new SolidColorBrush(Colors.Black);
                      Binding binding = new Binding("dDuedate");
                      binding.Source = dp;
                      binding.Mode = BindingMode.OneWay;
                      binding.Converter = new SizeToBackgroundConverter();
                      e.Row.Cells[4].SetBinding(Control.ForegroundProperty, binding);
                   }
                }
             }
          }
    Now,I down load the latest build of your second beta Q3 this Saturday,in the On RowLoadedEvent,the"e.Row.Cells.Count = 0".But in Q2,It works,the e.Row.Cells.Count is not 0.
    Would you give me an answer?
    Thanks!
  2. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 24 Oct 2009 Link to this post

    Hi

    I think you'll find your answer there

    http://www.telerik.com/community/forums/silverlight/gridview/q3-beta-2-and-rowloadedevent.aspx

    Ludovic



  3. DevCraft banner
  4. Simon yang
    Simon yang avatar
    15 posts
    Member since:
    Sep 2009

    Posted 24 Oct 2009 Link to this post

    It didn't works,I have downLoad the latest build Beta2_2009_3_1023.
  5. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 24 Oct 2009 Link to this post

    I guess it means they know about the bug, but they didn't have time to fix it for yesterday's release.

    Maybe it will be on the next one, I think that at worst, it will be ok for the official release.
  6. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 04 Nov 2009 Link to this post

    Hello

    Now that I use the official release, I saw that you fixed the problem about the cell count, thanks for that.

    But in the same matter, there is something that bothers me.

    It seems that the cell.count only reflects the visible cells.

    Let me explain. In my case, I have a collection of elements containing 19 properties.
    So, my grid is built with 19 static columns. But the user has no use for the last 7 columns, but I do need the information in these 7 cells to perform several tasks.

    The thing is, the e.Row.cells.Count is 12 in my case, which means it only contains the cells from the visible columns.

    Is it a bug or is it intended to work that way ?
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 05 Nov 2009 Link to this post

    Hello Ludovic,

    This is due to the fact that columns virtualization is on by default you can however turn it off by setting EnableColumnVirtualization to false.

    Regards,
    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.
  8. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 05 Nov 2009 Link to this post

    Well, I've tried that, but it doesn't change the total count of e.Row.Cells, it is still 12 (an therefor, I'm still having my error)
  9. Jennifer
    Jennifer avatar
    16 posts
    Member since:
    Nov 2007

    Posted 06 Nov 2009 Link to this post

    I downloaded the latest Silverlight controls from the website where I login and I still cannot get EnableColumnVirtualization to come up in intellisense. I downloaded this: RadControls_for_Silverlight_2009_3_1103_DEV.msi

    What do I have to do? I removed referenced and re added as well.

    Thanks
  10. Jennifer
    Jennifer avatar
    16 posts
    Member since:
    Nov 2007

    Posted 06 Nov 2009 Link to this post

    Nevermind - I now see I must reference Q3 now not Q2
Back to Top
DevCraft banner