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

Cannot add content of type...

2 Answers 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Harun Residbegovic
Top achievements
Rank 1
Harun Residbegovic asked on 30 Jul 2009, 08:37 AM
Hi,

I'm having a problem with the GridView control on a client's machine. When I or my colleagues compile and run it everything goes right. However, when we deploy on a client's machine we get an error message saying "Cannot add content of type 'Telerik.Windows.Controls.GridViewDataColumn' to an object of type 'Telerik.Windows.Controls.GridViewColumnCollection'. Error at object 'Telerik.Windows.Controls.GridViewDataColumn' in markup file 'CowculationsWindows;component/useradmin.xaml' Line 57 Position 18."

This is the code:

<telerik:RadGridView Margin="15,66,9,46" Name="rgvUsers" AutoGenerateColumns="False" AddingNewDataItem="rgvUsers_AddingNewDataItem" ValidationMode="Row" AutoGenerateHierarchyFromDataSet="True" ColumnsWidthMode="Auto">   
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Full Name" UniqueName="UserFullName" Header="Full Name"/>
                <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="User Name" UniqueName="UserName" Header="User Name"/>
                <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Password" UniqueName="Password"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

The particular line where the error happens is this:

<telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Full Name" UniqueName="UserFullName" Header="Full Name"/>

The GridView uses hierarchy, so that might be an issue.

Please help.

Regards,

-Harun



2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 31 Jul 2009, 07:18 AM
Hello Harun,

Any more info about the grid version and client machine environment will be appreciated. If you can send this project (via support ticket) we will gladly try to reproduce the problem locally.

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Harun Residbegovic
Top achievements
Rank 1
answered on 07 Aug 2009, 06:01 PM
Hi Vlad,

Installing the .NET Framework 3.5 SP1 fixed the problem. I hope this info will help if somebody else gets the same issue.

Thanks,

-Harun
Tags
GridView
Asked by
Harun Residbegovic
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Harun Residbegovic
Top achievements
Rank 1
Share this question
or