This question is locked. New answers and comments are not allowed.
I have looked through the forums and documentation but I'm still not sure how to add 6 static rows to a one column grid. These row's values are text only and won't change and I would like them to show at design time so I need a way to add them through the xaml. I like the look and feel of the grid otherwise I would just use a listbox, etc.
Thanks!
Thanks!
4 Answers, 1 is accepted
0
Hi Aaron,
Vanya Pavlova
the Telerik team
You can use this approach:
<telerik:RadGridView> <telerik:RadGridView.Items> <sys:String>item 1</sys:String> <sys:String>item 2</sys:String> <sys:String>item 3</sys:String> <sys:String>item 4</sys:String> <sys:String>item 5</sys:String> <sys:String>item 6</sys:String> </telerik:RadGridView.Items></telerik:RadGridView>Hope this helps.
All the best,Vanya Pavlova
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Aaron
Top achievements
Rank 1
answered on 11 Jan 2011, 06:51 PM
Thanks Vanya. I appreciate you looking into this. Here is the xaml with your example but I'm not seeing the values show at design or run-time.
<telerik:RadGridView Name="Sections" CanUserReorderColumns="False" IsFilteringAllowed="False" IsReadOnly="True" CanUserFreezeColumns="False" CanUserResizeColumns="False" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" CanUserInsertRows="False" CanUserDeleteRows="False" BorderThickness="0" AutoGenerateColumns="False" RowHeight="20" > <telerik:RadGridView.Columns> <telerik:GridViewColumn Width="200"/> </telerik:RadGridView.Columns> <telerik:RadGridView.Items> <sys:String>item 1</sys:String> <sys:String>item 2</sys:String> <sys:String>item 3</sys:String> <sys:String>item 4</sys:String> <sys:String>item 5</sys:String> <sys:String>item 6</sys:String> </telerik:RadGridView.Items></telerik:RadGridView>0
Accepted
Hello Aaron,
Vanya Pavlova
the Telerik team
Having in mind the fact that RadGridView's AutoGenerateColumns property is set to False just replace the GridViewColumn with GridViewDataColumn and everything will work as expected, you may find attached the sample project that demonstrates this approach.
If you need any further assistance please let me know.
Vanya Pavlova
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Aaron
Top achievements
Rank 1
answered on 12 Jan 2011, 03:10 PM
Thank you very much Vanya. That worked.