This question is locked. New answers and comments are not allowed.
Before I write new code, I wonder if it already exists? My end-user wants the ability to select the columns that are to be visible in the grid from a popup list of columns with check boxes next to each column name. They select the columns they want to see.
Does Telerik Silverlight offer something like this OOB?
Thank you
Does Telerik Silverlight offer something like this OOB?
Thank you
5 Answers, 1 is accepted
0
Accepted
Hello,
Vlad
the Telerik team
There is no such built-in functionality however we have an example which may help you in your case.
Regards,Vlad
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
0
Accepted
Josh
Top achievements
Rank 1
answered on 25 Sep 2012, 09:57 PM
We were easily able to implement something similar to this with the following:
It's worth noting that the all of our headers are TextBlocks.
<
ListBox
ItemsSource
=
"{Binding ElementName=PART_grid, Path=Columns}"
MinHeight
=
"150"
MaxHeight
=
"150"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
CheckBox
IsChecked
=
"{Binding Path=IsVisible, Mode=TwoWay}"
/>
<
TextBlock
Text
=
"{Binding Path=Header.Text}"
/>
</
StackPanel
>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
It's worth noting that the all of our headers are TextBlocks.
0
Marcel
Top achievements
Rank 1
answered on 26 Sep 2012, 10:50 PM
Hi Josh, Vlad
Vlad, the example you showed was good but the code is abstracted away. Can you provide the code?
Thanks Josh - it's working. My listbox was not showing the column names - I had to remove '.Text' from the pasted line.
Vlad, the example you showed was good but the code is abstracted away. Can you provide the code?
Thanks Josh - it's working. My listbox was not showing the column names - I had to remove '.Text' from the pasted line.
<
TextBlock
Text
=
"{Binding Path=Header.Text}"
0
Hello,
Vlad
the Telerik team
I'm not sure I understand. Have you checked the code of the demo? You can click the "code" button in the top right part of the demo.
Greetings,Vlad
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
0
Marcel
Top achievements
Rank 1
answered on 27 Sep 2012, 03:03 PM
Hi Vlad,
You were right - all the code was there and I got it working on my end. This is a very nice solution. THANK YOU.
For anyone intertested, I couldn't find a way to copy the code from the online example, BUT the code is available on your hard drive in the demos\examples folders.
You were right - all the code was there and I got it working on my end. This is a very nice solution. THANK YOU.
For anyone intertested, I couldn't find a way to copy the code from the online example, BUT the code is available on your hard drive in the demos\examples folders.