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

[Solved] Checkbox in Gridview Column...

4 Answers 216 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.
mark
Top achievements
Rank 1
mark asked on 09 Jun 2009, 11:02 PM
I am having a TERRIBLE time trying to get a checkbox column to work in a column.  I have downloaded SEVERAL samples from this forum to try to get it working.  I still get the error message:

Invalid attribute value telerik:GrivdViewCell

Here are my namespaces:
xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:telerikMedia="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.MediaPlayer"
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

dll Versions: 
Runtime:  v2.0.50727
Version:  2009.1.526.1020

Here is my xaml:
<telerik:RadGridView HorizontalAlignment="Left" Foreground="Brown" ShowGroupPanel="False" CanUserReorderColumns="True" Name="radGridElementItems" Grid.Row="0" Grid.Column="0" AutoGenerateColumns="False" Width="800">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewColumn HeaderText="">
                                    <telerik:GridViewColumn.CellStyle>
                                        <Style TargetType="telerik:GridViewCell">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="telerik:GridViewCell">
                                                        <Border Padding="5,0,5,0" BorderThickness="0,0,1,1" BorderBrush="#FFB3B3B3">
                                                            <CheckBox Checked="OnCheckBoxCheckedUnchecked" Unchecked="OnCheckBoxCheckedUnchecked" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                        </Border>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </telerik:GridViewColumn.CellStyle>
                                </telerik:GridViewColumn>
                                <telerik:GridViewDataColumn HeaderText="Item Barcode" Width="115" DataMemberBinding = "{Binding ItemBarcode}" ></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderText="Container Barcode" Width="140" DataMemberBinding = "{Binding ContainerBarcode}"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderText="Status" Width="90" DataMemberBinding = "{Binding Status}"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderText="Site" Width="175" DataMemberBinding = "{Binding SiteDescription}"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderText="Vault" Width="75" DataMemberBinding = "{Binding VaultName}"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderText="Rack" Width="75" DataMemberBinding = "{Binding Rack}"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderText="Slot" Width="75" DataMemberBinding = "{Binding Slot}"></telerik:GridViewDataColumn>
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>

Thank you very much.


4 Answers, 1 is accepted

Sort by
0
mark
Top achievements
Rank 1
answered on 09 Jun 2009, 11:12 PM
Sorry, here is more information:

 Silverlight 2
Visual Studio 2008
ASP.NET 3.5

thanks
0
Vlad
Telerik team
answered on 10 Jun 2009, 05:27 AM
Hi mark,

You need to register Telerik.Windows.Controls.GridView namespace!

xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"

TargetType="telerikGridView:GridViewCell"

Sincerely yours,
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
mark
Top achievements
Rank 1
answered on 10 Jun 2009, 04:48 PM
Great, thanks.  So that fixed my namespace problem, but now when I click on the tab that has the grid in it, I get this error and the whole application crashes:
System.OutOfMemoryException was unhandled
Message: An unhandled exception of type 'System.OutOfMemoryException' occurred in Unknown Module.

When I take the checkbox column out, the problem goes away.

Help/thanks.



0
mark
Top achievements
Rank 1
answered on 10 Jun 2009, 05:31 PM
ANSWER:  kind of...I had the Grid loaded inside of a regular Silverlight Tab inside a Tab Control, and THAT was inside a RadWindow.  I took the Grid OUT of the Tab, added it to it's OWN RadWindow and the memory problem went away.  I think I would RATHER have the grid inside my other tab and NOT in a new RadWindow, but if the users don't mind, I might be able to get away with it.

thanks
Tags
GridView
Asked by
mark
Top achievements
Rank 1
Answers by
mark
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or