Hello Telerik,
Our solution needs a footer row for the grids, for now containing only the item count.
I have browsed some of solution for this such as this one, but it won't attend to my needs for a couple of reasons:
- the footer cells need to be merged as if there was a column spam there
- the footer needs to be independent of a column. A simple count of all the rows before and after the grid built-in filtering.
Regarding the second point, please do correct me if I am wrong, but I am assuming that the
<
telerik:GridViewDataColumn.AggregateFunctions
>
<
telerik:CountFunction
Caption
=
"Count: "
/>
</
telerik:GridViewDataColumn.AggregateFunctions
>
is out of question, since it is column-bound. And the reason why it won't serve is because my grid has a columnchooser. if the user unselect that column, the count will disappear. Which is pointless. So I didn't even bother looking too deep on how to merge cells horizontally, since I believe a row just below the grid containing the count should be the way to go.
Furthermore my grid receives a VirtualQueryableCollectionView as datasource. And the only indicator of the Rows Count that it has is the VirtualItemCount = data.Count(). The problem is that property won't change in case the user filters the grid.
Finally my question is: where can I find the Grid Total Rows Count that will also show the right number after filtering?
Thank you
hi
I have an EntityFramework table as my ItemsSource:
Ent = new Data.xEntities();
RadViewGrid.ItemsSource = Ent.Table;
If I insert a row from the "new row" row in the grid it disappears an does not show in the grid. Even if I Rebind() the grid.
If I
Ent.SaveChanges();
RgvUsers.Rebind();
it works. But I would like to save all changes at once via a Save Button.
How can I make the inserted row show in the grid without committing it back to the db? Thanks.
Regards,
Michael
Hello!
I am trying to find a way to be able to change the HeaderTemplate based on the tile state. Example, when switch from normal content to large content in the RadFluidContainer, I want the header to look different (several controls are added and removed).
Right now I have the following:
<
Style
x:Key
=
"RadTileViewItemStyle"
TargetType
=
"{x:Type telerik:RadTileViewItem}"
>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"telerik:TileViewPanel.IsRowsShrinkEnabled"
Value
=
"True"
/>
<
Setter
Property
=
"telerik:TileViewPanel.IsColumnsShrinkEnabled"
Value
=
"True"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource PingLiteGrayBackground}"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"{x:Null}"
/>
<
Setter
Property
=
"Padding"
Value
=
"10"
/>
<
Setter
Property
=
"Foreground"
Value
=
"Black"
/>
<
Setter
Property
=
"TileState"
Value
=
"Restored"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type telerik:RadTileViewItem}"
>
<
Grid
SnapsToDevicePixels
=
"True"
>
<
Border
Style
=
"{DynamicResource PingDarkBrushBorder2Shaddow2}"
Margin
=
"{TemplateBinding Padding}"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
ContentPresenter
x:Name
=
"ContentElement"
ContentTemplate
=
"{DynamicResource MyTileViewContentFluid}"
Content
=
"{TemplateBinding Content}"
Grid.Row
=
"1"
/>
<
Border
Grid.Row
=
"0"
BorderThickness
=
"0,0,0,1.5"
BorderBrush
=
"{StaticResource PingBlueBrush}"
Background
=
"{TemplateBinding Background}"
Padding
=
"10,0,7,0"
>
<
Grid
MinHeight
=
"28"
>
<
Border
x:Name
=
"GripBarElement"
Background
=
"Transparent"
>
<
ContentPresenter
x:Name
=
"HeaderElement"
ContentTemplate
=
"{DynamicResource MyHeaderTemplate}"
Content
=
"{TemplateBinding Content}"
HorizontalAlignment
=
"Stretch"
Margin
=
"0,0,10,0"
VerticalAlignment
=
"Center"
/>
</
Border
>
</
Grid
>
</
Border
>
<
Rectangle
x:Name
=
"DisabledVisual"
Fill
=
"{StaticResource PingBlueBrush}"
RadiusY
=
"4"
RadiusX
=
"4"
Grid.Row
=
"0"
Grid.RowSpan
=
"2"
Visibility
=
"Collapsed"
/>
</
Grid
>
</
Border
>
</
Grid
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"UseLayoutRounding"
Value
=
"True"
/>
</
Style
>
<
DataTemplate
x:Key
=
"MyHeaderTemplate"
>
<
Border
BorderBrush
=
"{x:Null}"
>
<
Grid
HorizontalAlignment
=
"Stretch"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Width
=
"50"
Height
=
"40"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Margin
=
"2"
Source
=
"{Binding PhotoPathUri}"
/>
<
TextBlock
Text
=
"{Binding EmployeeName}"
Style
=
"{StaticResource MyTeamMemberTileHeaderStyle}"
/>
</
StackPanel
>
<
CheckBox
x:Name
=
"CompareCheckbox"
Grid.Column
=
"1"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
Margin
=
"2,0,2,2"
ToolTip
=
"Add to Compare List"
Command="{Binding RelativeSource={
RelativeSource FindAncestor,
AncestorType={x:Type dialog:UserControlBase}},
Path
=
DataContext
.AddSelectedTeamMemberToCompareListCommand}"
CommandParameter
=
"{Binding EmployeeName}"
IsThreeState
=
"False"
>
<
CheckBox.IsChecked
>
<
MultiBinding
Converter
=
"{StaticResource CompareBoolConverter}"
Mode
=
"OneWay"
>
<
Binding
Path
=
"EmployeeName"
FallbackValue
=
""
/>
<
Binding
Path
=
"DataContext.MyTeamCompareList"
RelativeSource
=
"{RelativeSource FindAncestor, AncestorType={x:Type dialog:UserControlBase}}"
FallbackValue
=
""
/>
</
MultiBinding
>
</
CheckBox.IsChecked
>
<
CheckBox.LayoutTransform
>
<
ScaleTransform
ScaleX
=
"1.5"
ScaleY
=
"1.5"
/>
</
CheckBox.LayoutTransform
>
</
CheckBox
>
</
Grid
>
</
Border
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"MyTileViewContentFluid"
>
<
telerik:RadFluidContentControl
ContentChangeMode
=
"Manual"
TransitionDuration
=
"0:0:0.01"
State
=
"{Binding TileState, Converter={StaticResource FluidContentStateConverter}, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadTileViewItem}}}"
>
<!-- Region Small Content -->
<
telerik:RadFluidContentControl.SmallContent
>
<
Grid
Background
=
"{StaticResource PingBackgroundLiteBrush}"
>
<
TextBlock
Style
=
"{StaticResource SmallCardBriefInfoContentStyle}"
Text
=
"{Binding Position}"
/>
</
Grid
>
</
telerik:RadFluidContentControl.SmallContent
>
<!-- EndRegion Small Content -->
<!-- Region Normal Content -->
<
telerik:RadFluidContentControl.Content
>
<
Grid
Background
=
"{StaticResource PingBackgroundLiteBrush}"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
TextBlock
Text
=
"{Binding Position}"
Grid.Row
=
"0"
Style
=
"{StaticResource NormalCardBriefInfoContentStyle}"
/>
<
ItemsControl
Grid.Row
=
"1"
ItemsSource
=
"{Binding BusinessRoleList}"
>
<
ItemsControl.ItemsPanel
>
<
ItemsPanelTemplate
>
<
WrapPanel
Orientation
=
"Vertical"
ScrollViewer.VerticalScrollBarVisibility
=
"Visible"
/>
</
ItemsPanelTemplate
>
</
ItemsControl.ItemsPanel
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Margin
=
"30,4,4,2"
Text
=
"{Binding RoleName}"
FontSize
=
"16"
/>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
</
ItemsControl
>
</
Grid
>
</
telerik:RadFluidContentControl.Content
>
<!-- EndRegion Normal Content -->
<!-- Region Large Content -->
<
telerik:RadFluidContentControl.LargeContent
>
<
Grid
Background
=
"{StaticResource PingBackgroundLiteBrush}"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
TextBlock
Text
=
"{Binding Position}"
Grid.Row
=
"0"
Style
=
"{StaticResource NormalCardBriefInfoContentStyle}"
/>
<
ItemsControl
Grid.Row
=
"1"
ItemsSource
=
"{Binding BusinessRoleList}"
>
<
ItemsControl.ItemsPanel
>
<
ItemsPanelTemplate
>
<
WrapPanel
Orientation
=
"Vertical"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
/>
</
ItemsPanelTemplate
>
</
ItemsControl.ItemsPanel
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
>
<
TextBlock
Margin
=
"30,4,4,2"
Text
=
"{Binding RoleName}"
FontSize
=
"16"
/>
<
TextBlock
Margin
=
"30,4,4,2"
Text
=
"{Binding BusinessRoleDescription}"
FontSize
=
"14"
/>
</
StackPanel
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
</
ItemsControl
>
</
Grid
>
</
telerik:RadFluidContentControl.LargeContent
>
<!-- EndRegion Large Content -->
</
telerik:RadFluidContentControl
>
</
DataTemplate
>
VirtualQueryableCollectionView view = new VirtualQueryableCollectionView(viewModel0.GetQuery());
view.LoadSize = 40;
EntityDataGrid.ItemsSource = view;
using (Stream stream = dialog.OpenFile())
{
GridViewExportOptions exportOptions = new GridViewExportOptions();
exportOptions.Format = format;
exportOptions.ShowColumnFooters = false;
exportOptions.ShowColumnHeaders = true;
exportOptions.ShowGroupFooters = true;
EntityDataGrid.Export(stream, exportOptions);
}
Hello,
Here is the original post http://www.telerik.com/forums/how-to-hide-the-leftautohide-panel#lu74NKZBOkq6pQQzmGGTCA
I could not get much help there so asking here if someone could please help.
Thanks
Sherry
I have problem with something I would call double (mean second) click on DataColumn I have to edit. The problem is that when I click on it first time I got following edit possibility:
https://i.stack.imgur.com/DRNoh.png
And it is way i want to edit value. But there is another way to edit it and I don't know how to disable that possiblity, when you click second time on that element, or you click twice on place without number you get fallowing edit space:
https://i.stack.imgur.com/zW6zz.png
When I have 0 value it behaves like on this picture above, when I have there anything else it display: "80.1600" or "2.00"
How can I disable it?
Here is code:
<
telerik:GridViewDataColumn
Header
=
"{Binding Source={x:Static properties:Resources.Discount},Converter={StaticResource StringAddPercentAtEndCoverter}}"
MinWidth
=
"60"
IsCellMergingEnabled
=
"False"
IsFilterable
=
"False"
IsSortable
=
"False"
ShowDistinctFilters
=
"False"
DataMemberBinding
=
"{Binding Discount, StringFormat='n0'}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadMaskedNumericInput
Value
=
"{Binding Discount, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
Mask
=
""
Placeholder
=
""
FormatString
=
"n0"
SelectionOnFocus
=
"Default"
maskedInput:MaskedInputExtensions.Minimum
=
"0"
maskedInput:MaskedInputExtensions.Maximum
=
"100"
BorderThickness
=
"0"
Background
=
"Transparent"
IsClearButtonVisible
=
"False"
HorizontalAlignment
=
"Right"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
I have a confused issue
There is a listbox and it's items is also listbox I want to do something when double the subitem listbox's item
when the subitem listbox is not show full, click it's item once, the listbox will show full and the item's position will change,so can not double click the item
as the attach pic show I can double click the "aaa" item but can not doube click the "bbb" item when the second listbox is not show full
Is any solution to resolve this issue?
thank you
For the life of me I can't see what's wrong. I have a radgriview and I edit rowdetails with the raddataform. everything works great except the validation.
I am using the code below metadatatype (as an example) to add validation attributes to a class generated by EF. Obviously, this class is what I have bound to the dataform. I've stripped it to the bare min for this discussion.
The commented out code below shows a "buddy" class that I have implemented as a test to make sure the annotations are working. They are. If I have to create buddy classes and copy data for each returned record from a database query I will, but it seems rather a pain.
Any insight would be greatly appreciated. I read somewhere that this metadata thing is not support by you. Is this true? If so, what is the recommended way of getting the job done?
Thanks ... Ed
[MetadataType(typeof(CALMS_SamplesMetaData))]
public partial class CALMS_Samples: ValidatableBindableBase
{
}
public class CALMS_SamplesMetaData : ValidatableBindableBase
{
private string _clientSampleID;
[Required(ErrorMessage = "Required.")]
[MaxLength(50, ErrorMessage = "Exceeded 50 characters")]
public string ClientSampleID
{
get { return _clientSampleID; }
set { SetProperty(ref _clientSampleID, value); }
}
}
//public partial class CALMS_Samples : ValidatableBindableBase
//{
// private string __test1;
// [Required(ErrorMessage = "Required.")]
// public string test1
// {
// get { return __test1; }
// set { SetProperty(ref _cli_test1entSampleID, value); }
// }
//}