Hi
I have a requirement where i need to pass in a custom formatter for values in a GridViewDataColumn. I looked at DataFormatString but i don't think it satisfies my requirement.My requirement is that i need to round the decimal to 4 decimal places but also show a negative sign if the number is negative. For example, if the number is -0.000001, then my grid should show -0.0000 and not just 0.0000. For a positive number, it should just display 0.0000. How do i get this working? Any help is much appreciated.
Thanks
Vinoth
public
class
WarehouseItem : INotifyPropertyChanged
{
public
event
PropertyChangedEventHandler PropertyChanged;
private
bool
isExpanded;
private
string
name;
private
IList<WarehouseItem> m_items;
public
WarehouseItem(
string
name,
int
count,
bool
isExpanded =
true
)
{
this
.Name = name;
this
.IsExpanded = isExpanded;
this
.Items = (from l_i
in
System.Linq.Enumerable.Range(0, count)
select
new
WarehouseItem(
"SubItem"
+ (l_i + 1), 0,
false
)).ToList();
}
public
string
Name
{
get
{
return
this
.name;
}
set
{
if
(value !=
this
.name)
{
this
.name = value;
this
.OnPropertyChanged(
"Name"
);
}
}
}
public
bool
IsExpanded
{
get
{
return
this
.isExpanded;
}
set
{
if
(value !=
this
.isExpanded)
{
this
.isExpanded = value;
this
.OnPropertyChanged(
"IsExpanded"
);
}
}
}
public
IList<WarehouseItem> Items
{
get
{
return
this
.m_items; }
set
{
if
(
this
.m_items != value)
{
this
.m_items = value;
this
.OnPropertyChanged(
"Items"
);
}
}
}
protected
virtual
void
OnPropertyChanged(PropertyChangedEventArgs args)
{
PropertyChangedEventHandler handler =
this
.PropertyChanged;
if
(handler !=
null
)
{
handler(
this
, args);
}
}
private
void
OnPropertyChanged(
string
propertyName)
{
this
.OnPropertyChanged(
new
PropertyChangedEventArgs(propertyName));
}
}
<
telerik:RadTreeListView
IsExpandedBinding
=
"{Binding IsExpanded, Mode=TwoWay}"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding}"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Items}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsExpanded}"
Header
=
"Is Expanded"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
Hi,
I am having 5 RadGroup inside RadSplitContainer in my View and data binding is happening through using PRISM and MVVM.
When the RadGroup is getting pinned and unpinned, that particular RadGroup is moving to last in the sequence.
I don't want this behavior. I want the group show in the same sequence as it is declared in XAML.
Please suggest how I can achieved this.
--
Thanks & Regrads
Manoj S
Hellow,
When deleting the selected row in RadGridView, the selection changes automatically to another row. How can I cancel this behaviour ?
There are "Deleted" and "Deleting" events indeed, but they are fired only following a user's deletion. In my case, the deletion is made following a change in the ItemsSource collection.
I am using RadMaskedNumericInput, I have set the max and min and i have allow null to true, I want the users to be able to delete everything in the text box. But the first time user hit backspace it puts a zero in the text box, if i hit backspace again it will remove the zero.
is there i way to prevent the first zero.
And the interesting thing is that the binding value is set to null the first time i hit backspace, so the UI is 0 but the binding value is null, then when i hit backspace again to get rid of 0 the setter is never called.
Thanks
Vikas Mittal
<telerik:RadMaskedNumericInput Mask="" MaskedInput:MaskedInputExtensions.Maximum="99999999"
TextMode="MaskedText" MaskedInput:MaskedInputExtensions.AllowNull="True"
Width="100" IsClearButtonVisible="False" Height="30" HorizontalAlignment="Center"
MaskedInput:MaskedInputExtensions.Minimum="1"
Style="{StaticResource SvtRadMaskedNumericInputStyle}" Value="{Binding Frequency, NotifyOnValidationError=True}"/>
Hi! In my WPF MVVM application I'm in need of presenting of hierarchical information in RadPropertyGrid without use of built-in collections editor. The hierarchical information in RadPropertyGrid must be presented approximately in the following manner:
- "Sirius" Gas Flowmeter
- Settings
- Real-Time Clock
TimeZone 0
Date 20062016
Time 163716
- SerialInterface
BusAddress 1
BaudRate 115200
- GasFlowProfileCorrection
- CompensationUltrasonicBeamFailure
CompensationWeight 12000
Weight_1 0.00015
Correction_1 0
I am using the ScheduleView component with the timeline view.
I can set the current date and start time, but how do I zoom to a specific time range, so that on the left I have (for example) 9am and on the right I have 5pm?
Thanks
Dear team,
for some reason I have a collection of MemberColumnFilterDescriptors and I must apply these filters to a List in my ViewModel. It exists a way to do that? Maybe creating a "where" predicate to include in a linq or something?
Thanks in advance
Hi,
I'm trying to close a floating pane then open another window on top of my main form, however the main form being activated once the floating pane is closed resulting in the 2nd form being hidden. Setting the 2nd form to topmost isn't a solution for my requirements. How can I prevent the focus moving back to the main window's docking control?
Here is the xaml code:
<
telerik:RadDocking
x:Name
=
"radDocking"
BorderThickness
=
"0"
Padding
=
"0"
>
<
telerik:RadSplitContainer
x:Name
=
"WorkflowWindowContainer"
InitialPosition
=
"FloatingOnly"
telerik:RadDocking.FloatingLocation
=
"1250, 700"
telerik:RadDocking.FloatingSize
=
"600,250"
>
<
telerik:RadPaneGroup
>
<
telerik:RadPane
Header
=
"Floater"
x:Name
=
"floatingPane"
ContextMenuTemplate
=
"{x:Null}"
CanUserClose
=
"True"
IsHidden
=
"False"
>
<
Label
Content
=
"I'm a floating window"
></
Label
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
Code behind:
floatingPane.IsActive = false;
floatingPane.IsHidden= true;
SecondWindow window = new SecondWindow();
window.Show();