<telerikPresentation:GridViewDataColumn x:Name="units" DataMemberBinding="{Binding bale_cnt, Mode=TwoWay}" Header="Units" Width="95" TextAlignment="Right" />
What I really want to do is this:
I am changing a free-text-field to a categorized field. The categories are objects of a custom class, that I made (ie not a string). I do not want to force my users to select a category on old objects. However, if they want to give a category, they must not be able to select null (also, new objects has null as the SelectedCategory). So I have the old string property and a new SelectedCategory property on my class. On old object SelectedCategory is null - which is good.
However in GridViewComboBoxColumn - since I do have null in the ItemsSource, the first category in the ItemsSource gets selected automatically when the ViewModel provides null as the selected category to the column.
So I try to bypass this behaviour by inserting null in ItemsSource - but then I need to Collapse the item with the value null so that it becomes invisible to the user.
But there are no GridViewComboBoxColumn.ItemsStyleHow do I do this?
I do not want to make a validation rule - because I do not want the old objects without a selected category to flash red.
I do not want to have the null value on the userinterface for the user to select and then give him an error that he cannot select it anyway.
Hi!
I use GridView for displaying objects such as:
class Detail {
string Name
string Value
string DetailGroup
}
I create collection and bound GridView ItemsSource to it. In gridView i create 3 columns for each property. Then i start my application I want to the default group was by DetailGroup property. I use GroupingDescriptor, but i don't understand, how can i connect it with My DetailGroupColumn or how to bing it to the Collection property (DetailGroup).
Will be grateful for help, I hope somebody had such problem.
Hi,
I have a simple radgridview in a window. The auto scrolling on the radgridview seems to allow scrolling way past the last record. There are 52 records but no matter what height I give the gridview the scrolling always allows to scroll down past the last record with lots of white space. I have attached a screenshot. Below is my xaml:
<Window x:Class="WishAdminWPF.RoomingListWindowView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:WishAdminWPF"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:VM="clr-namespace:WishAdminWPF.ViewModels"
mc:Ignorable="d"
ResizeMode="NoResize"
d:DesignHeight="400" d:DesignWidth="400"
SizeToContent="WidthAndHeight"
Title="Rooms"
WindowStartupLocation="CenterScreen" Loaded="WindowBase_Loaded">
<Window.DataContext>
<VM:RoomingListWindowViewModel/>
</Window.DataContext>
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
</Window.Resources>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="200"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<telerik:RadGridView Grid.Row="0" Grid.Column="0" Name="grdViewRoominglst" Margin="5" Width="380" Height="200" VerticalAlignment="Top"
ItemsSource="{Binding RoomingList}"
ShowGroupPanel="False"
AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Room Type" Width="auto" DataMemberBinding="{Binding RoomType}" IsReadOnly="True"/>
<telerik:GridViewDataColumn Header="Available" Width="auto" DataMemberBinding="{Binding RoomsAvail}" IsReadOnly="True"
IsVisible="{Binding ShowAvailableRooms, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<telerik:GridViewDataColumn Header="Number" Width="auto" DataMemberBinding="{Binding RoomsUsed}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5">
<Button Height="25" Width="60" Margin="5,5,0,5" Name="btnOk" IsDefault="True" Click="btnOk_Click">OK</Button>
<Button Height="25" Width="60" Margin="5,5,0,5" Name="btnCancel" Click="btnCancel_Click">Cancel</Button>
</StackPanel>
</Grid>
</Window>
Hello,
How can I format RadTimePicket time from XAML? I want to get MM:SS, is that possible?
​
Thanks!
Hi,
I need to understand how to implement a custom aggregate function which performs a weighted average. Or at the very least, a sum product. Ideally the user should be able to select both the item and then the item to weight it by.
Is this even possible? If yes, can you please provide an example of how it can be achieved.
I notice that the the official marketing spiel at WPF Pivot Grid mentions weighted averages within the Calculations section. However, it's not obvious to me how this can be done.
Thanks in advance,
Charles
I have a RadGridView with a GridViewComboBoxColumn. The GridViewComboBoxColumn displays two columns when it drops down. I would like to show headers for each column inside the ComboBox so that the user can sort the lists by either column.
However, I am unable to display the headers.
Here is my code:
<
telerik:RadGridView
Grid.Row
=
"1"
Name
=
"mainGridView"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewComboBoxColumn
UniqueName
=
"NominalAccount"
Header
=
"Nominal Account"
Width
=
"*"
DataMemberBinding
=
"{Binding RefCode}"
ItemsSource
=
"{Binding NominalAccountsItemList, Mode=TwoWay}"
DisplayMemberPath
=
"DisplayName"
SelectedValueMemberPath
=
"RefCode"
>
<
telerik:GridViewComboBoxColumn.ItemTemplate
>
<
DataTemplate
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"{Binding RefCode}"
Padding
=
"0,0,6,0"
></
TextBlock
>
<
TextBlock
Text
=
"{Binding NominalAccountName}"
Grid.Column
=
"1"
></
TextBlock
>
</
Grid
>
</
DataTemplate
>
</
telerik:GridViewComboBoxColumn.ItemTemplate
>
</
telerik:GridViewComboBoxColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
Any help on how to get headers for my columns in the dropdown would be much appreciated!
Thanks in advance
Hi.
I'm currently working on a dialog to upload files to our cloud service. Since we just acquired a Telerik license, I thought I'll go through the controls, and see what we can take advantage of.
The CloudUpload dialog seems to be exactly what I want. The only caveat, is that our workflow permits for opening a File Open dialog, as well as drag/drop onto a grid. Is it possible for the CloudUpload control to accept a list of files, hence negate the need for the browse button ?
Thanks.
Some of clients want to display 5 minute interval slots, I am able to change the minor tick to 5 min but the problem is that there are too many lines and everything is very small, I was looking for any suggestions on how to make it more user friendly. I have attached a screen shot.
Thanks
Vikas