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

ObjectContainerDataSource question...

2 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
King Wilder
Top achievements
Rank 2
King Wilder asked on 19 Oct 2008, 08:18 PM
I downloaded the Telerik ObjectContainerDataSource sample and while that works, my implementation of it doesn't, completely.

I can get the page to load and data to load into the grid, but when I try to edit or insert a new record, the entire grid collapses to a single line.

I've scoured my code to the Telerik code and they seem to be similar, except mine is pointing to my data objects.

So I've finally realized I need to consult the Forums.

Does anyone know why the grid is collapsing when I try to insert or edit a record?

If it helps, I'm also using Unity, the Dependency Injection component from Microsoft.

Thanks,

King Wilder

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 Oct 2008, 07:02 AM
Hello King,

Most probably the grid is not bound for some reason. Can you verify using the debugger what may causing this?

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
King Wilder
Top achievements
Rank 2
answered on 20 Oct 2008, 04:29 PM
It does seem to be bound, because when the usercontrol (with the RadGrid) loads, it's populated with the correct data.

I have two (2) ObjectContainerDataSource controls on the page since my grid contains a DropDown control.
  • SourcePhones - OCDS for the grid data
  • SourcePhoneTypes - OCDS for the phone types DropDown control (Home, Work, Cell, etc)
But when I debug, it never hits the Selecting event for the SourcePhones control.  It does, however, hit the SourcePhoneTypes control for each row in the grid, which seems correct.

I should also mention that I am NOT using the WCSF MVP pattern.  I'm just using Unity integrated into an ASP.NET web application.

I may end up trying to use StructureMap as my Inversion of Control container and see if I have better luck with the RadGrid.

If you come up with any other ideas, I would love to hear them.

Thanks,

King Wilder
Tags
Grid
Asked by
King Wilder
Top achievements
Rank 2
Answers by
Vlad
Telerik team
King Wilder
Top achievements
Rank 2
Share this question
or