This is a migrated thread and some comments may be shown as answers.

Problem in RowLoadedEvent

8 Answers 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Simon yang
Top achievements
Rank 1
Simon yang asked on 24 Oct 2009, 07:21 AM
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!

8 Answers, 1 is accepted

Sort by
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 24 Oct 2009, 10:00 AM
Hi

I think you'll find your answer there

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

Ludovic



0
Simon yang
Top achievements
Rank 1
answered on 24 Oct 2009, 10:09 AM
It didn't works,I have downLoad the latest build Beta2_2009_3_1023.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 24 Oct 2009, 10:10 AM
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.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 04 Nov 2009, 06:28 PM
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 ?
0
Vlad
Telerik team
answered on 05 Nov 2009, 06:54 AM
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.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 05 Nov 2009, 08:37 AM
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)
0
Jennifer
Top achievements
Rank 1
answered on 06 Nov 2009, 10:30 PM
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
0
Jennifer
Top achievements
Rank 1
answered on 06 Nov 2009, 10:53 PM
Nevermind - I now see I must reference Q3 now not Q2
Tags
GridView
Asked by
Simon yang
Top achievements
Rank 1
Answers by
Ludovic Gerbault
Top achievements
Rank 1
Simon yang
Top achievements
Rank 1
Vlad
Telerik team
Jennifer
Top achievements
Rank 1
Share this question
or