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

Rebind not working in C#

2 Answers 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Snehal
Top achievements
Rank 1
Snehal asked on 16 Jul 2010, 01:40 PM
Hello Telerik Team,

I Converted code VB to C#. In VB it is alreday tasted & worked perfectly but in C# Rebind is not working properly.

While loading window am setting like below:

  rgvSet.ItemsSource = DataModule.objSets;
  rgvOrders.ItemsSource = DataModule.objOrderList;
  rgvTour.ItemsSource = DataModule.objTourList;
  rgvTruck.ItemsSource = (from p in DataModule.objTruckList where p.Status == DataModule.Cons_Status_Available select p).ToList<clsTruck>();
  rgvTrailer.ItemsSource = (from p in DataModule.objTrailerList where p.Status == DataModule.Cons_Status_Available select p).ToList<clsTrailer>();
        rgvDriver.ItemsSource = (from p in DataModule.objDriverList where p.Status == DataModule.Cons_Status_Available select p).ToList<clsDriver>();

"rgv... " are RadgridView and all List are ObservableCollection. After doing such operation adding/removing/updating in collection am rebinding appropriate grid. Grid which having itemsource as LINQ query will not Rebind but Grid which have collection as Itemsource will rebind correctly.

What could be a reason? any idea?

Thanks...!!!

2 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 19 Jul 2010, 08:04 AM
Hi Snehal,

Could you please send us a sample project that will allow us to reproduce the problem.
thank you for your time.


Sincerely yours,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Snehal
Top achievements
Rank 1
answered on 19 Jul 2010, 12:24 PM
HI Milan,

Problem get solved.
Instead of 
rgvTruck.ItemsSource = (from p in DataModule.objTruckList where p.Status == DataModule.Cons_Status_Available select p).ToList<clsTruck>();
If i write like:
 rgvTruck.ItemsSource = (from p in DataModule.objTruckList where p.Status == DataModule.Cons_Status_Available select p);

Its working perfectly. I have one more problem, but nobody given answer since last 4 days. if you please give me solution it is appriciable.
Link: http://www.telerik.com/community/forums/wpf/tileview/drag-drop-not-working-properly.aspx

THanks.!!!
Tags
GridView
Asked by
Snehal
Top achievements
Rank 1
Answers by
Milan
Telerik team
Snehal
Top achievements
Rank 1
Share this question
or