I am using a NewItemTemplate and EditTemplate in my DataForm. When I go into Add mode, the focus seems to be one tab short of my first textbox. In Edit mode, it appears to be one short of the buttons on the top of the data form. How do I get the focus to be on that first textbox in the datatemplate. (My datatemplates contain a grid with a series of horizontal stack panels because of some formatting I needed to be able to do.) Is there a way of turning off the tabstops for the "extra" controls? Or setting the focus to the first box?
The examples that I can find in the forums are either finding the first dataform field or turning off the tab stop on some controls so you can get from the last textbox to the ok button (I couldn't get that one to work either).
thanks!
The examples that I can find in the forums are either finding the first dataform field or turning off the tab stop on some controls so you can get from the last textbox to the ok button (I couldn't get that one to work either).
thanks!
4 Answers, 1 is accepted
0
Hello Koren,
Maya
the Telerik team
Firstly, please excuse me for the late reply. Considering the issue you have, indeed the ways to go would be those that you mentioned. Could you clarify what are the troubles you meet on implementing any of them ? What are your exact settings, how do you define your templates ? Once I have more information, I could try preparing a sample project illustrating the approaches mentioned above.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Koren
Top achievements
Rank 1
answered on 06 Sep 2012, 04:00 PM
Here is the data form that I am using. The readonlytemplate is fine. I just want the focus on the AssetNbr field for the edit and add mode. It would be nice if it didn't stop on the data form after the last field and went straight to the ok button also.
thanks!
thanks!
<
telerik:RadDataForm
x:Name
=
"dfAsset"
AutoGenerateFields
=
"False"
ItemsSource
=
"{Binding AssetRecordsView}"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
Header
=
"Asset Details"
AddedNewItem
=
"dfAsset_AddedNewItem"
DeletingItem
=
"dfAsset_DeletingItem"
EditEnded
=
"dfAsset_EditEnded"
>
<!-- VIEW ITEM -->
<
telerik:RadDataForm.ReadOnlyTemplate
>
<
DataTemplate
>
<
Grid
VerticalAlignment
=
"Stretch"
Margin
=
"5, 5, 5, 5"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"250"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"280"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"480"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"View Asset"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Style
=
"{StaticResource DataFormHeaderStyle}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Asset Nbr"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding AssetNbr}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"2"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"ATIGD"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding TransactionCode}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"2"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Description"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding Description}"
Width
=
"{StaticResource LargeLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"3"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Type"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding AssetType}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"3"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Orig Business %"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding BusinessPercent, StringFormat={}{0:p2}}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"4"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Service Date"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding InServiceDate, StringFormat={}{0:MM/dd/yyyy}}"
Width
=
"{StaticResource SmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"4"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Cost"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding OriginalCost, StringFormat={}{0:c2}}"
Width
=
"{StaticResource SmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"5"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Orig Units"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding OriginalQuantity, StringFormat={}{0:f2}}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"5"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Hours Use"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding PurchaseHoursUse, StringFormat={}{0:f2}}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"6"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Related Asset"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding RelatedAssetNbr}"
Width
=
"{StaticResource XSmallLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"6"
Grid.Column
=
"1"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowDeprEntity}"
>
<
TextBlock
Text
=
"Entity"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBlock
Text
=
"{Binding DeprEntity}"
Width
=
"{StaticResource LargeLabelWidth}"
HorizontalAlignment
=
"Left"
></
TextBlock
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"7"
Grid.ColumnSpan
=
"3"
Margin
=
"0,10,0,0"
>
<
telerik:RadGridView
x:Name
=
"grdAssetBookMethodsView"
Width
=
"872"
ItemsSource
=
"{Binding AssetBookMethods}"
CanUserFreezeColumns
=
"False"
RowIndicatorVisibility
=
"Collapsed"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
IsReadOnly
=
"True"
IsFilteringAllowed
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewColumn
Header
=
"Sched"
Width
=
"45"
CellStyle
=
"{StaticResource LeftAlignCell}"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadButton
Name
=
"btnViewDepr"
Content
=
"view"
VerticalAlignment
=
"Center"
Click
=
"btnViewDepr_Click"
></
telerik:RadButton
>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding DepreciationBook}"
Width
=
"45"
CellStyle
=
"{StaticResource LeftAlignCell}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Book"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Description}"
Width
=
"150"
CellStyle
=
"{StaticResource LeftAlignCell}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Description"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding AveragingConvention}"
Width
=
"40"
CellStyle
=
"{StaticResource LeftAlignCell}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"1st Yr Conv"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding DeprBeginDate}"
DataFormatString
=
"{}{0:MM/dd/yyyy}"
Width
=
"70"
CellStyle
=
"{StaticResource LeftAlignCell}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Beg"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding DeprEndDate}"
DataFormatString
=
"{}{0:MM/dd/yyyy}"
Width
=
"70"
CellStyle
=
"{StaticResource LeftAlignCell}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"End"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding BeginningBasis}"
DataFormatString
=
"{}{0:c2}"
Width
=
"75"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Beg Basis"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ExpenseDeduction}"
DataFormatString
=
"{}{0:c2}"
Width
=
"75"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Exp Ded"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding BonusDepr}"
DataFormatString
=
"{}{0:c2}"
Width
=
"75"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Bonus Depr"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding PriorDepr}"
DataFormatString
=
"{}{0:c2}"
Width
=
"75"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Prior Depr"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Credit}"
DataFormatString
=
"{}{0:c2}"
Width
=
"75"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Credit"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding SalvageValue}"
DataFormatString
=
"{}{0:c2}"
Width
=
"75"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Salvage"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"8"
Grid.ColumnSpan
=
"2"
Margin
=
"0,20,0,5"
>
<
telerik:RadButton
Name
=
"btnBusinessPercent"
Content
=
"Business Percent Changes"
Margin
=
"10,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"150"
Click
=
"btnBusinessPercent_Click"
></
telerik:RadButton
>
<
telerik:RadButton
Name
=
"btnAdjustment"
Content
=
"Basis Adjustments"
Margin
=
"10,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"150"
Click
=
"btnAdjustment_Click"
></
telerik:RadButton
>
</
StackPanel
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadDataForm.ReadOnlyTemplate
>
<!-- EDIT ITEM -->
<
telerik:RadDataForm.EditTemplate
>
<
DataTemplate
>
<
Grid
VerticalAlignment
=
"Stretch"
Margin
=
"5, 5, 5, 5"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"250"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"280"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Edit Asset"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Style
=
"{StaticResource DataFormHeaderStyle}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Asset Nbr"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBox
x:Name
=
"txtAssetNbr"
Text
=
"{Binding AssetNbr, Mode=TwoWay}"
Width
=
"{StaticResource XSmallLabelWidth}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"2"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"ATIGD"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddATIGD"
MinWidth
=
"{StaticResource DropDownWidth}"
Width
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding AssetTransactionCodeID, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
DisplayMemberPath
=
"CodeDescription"
SelectedValuePath
=
"AssetTransactionCodeID"
IsEditable
=
"True"
ItemsSource
=
"{Binding TransactionCodes}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"2"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Description"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedTextInput
x:Name
=
"txtDescription"
Mask
=
""
Width
=
"{StaticResource LargeLabelWidth}"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
TextMode
=
"PlainText"
InputBehavior
=
"Replace"
SectionsNavigationMode
=
"None"
Value
=
"{Binding Description, Mode=TwoWay}"
UpdateValueEvent
=
"LostFocus"
>
</
telerikInput:RadMaskedTextInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"3"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Type"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddAssetType"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding AssetTypeID, Mode=TwoWay}"
DisplayMemberPath
=
"DomainValue"
SelectedValuePath
=
"DVID"
IsEditable
=
"True"
ItemsSource
=
"{Binding AssetTypes}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"3"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Orig Business %"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtBusinessPercent"
Mask
=
"p3.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
IsEnabled
=
"{Binding AllowBusPercent}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"BusinessPercent"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:PercentValidationRule
Min
=
"0.00"
Max
=
"100.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"4"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Service Date"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadDatePicker
x:Name
=
"txtInServiceDate"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadDatePicker.SelectedValue
>
<
Binding
Path
=
"InServiceDate"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DateValidationRule
>
<
imKDSHelper:DateValidationRule.ValidDateRange
>
<
imKDSHelper:DateRangeChecker
Minimum
=
"{Binding MinDate}"
Maximum
=
"{Binding MaxDate}"
></
imKDSHelper:DateRangeChecker
>
</
imKDSHelper:DateValidationRule.ValidDateRange
>
</
imKDSHelper:DateValidationRule
>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadDatePicker.SelectedValue
>
</
telerikInput:RadDatePicker
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"4"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Cost"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtOriginalCost"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"OriginalCost"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"5"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Section 179"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtExpenseDeduction"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"ExpenseDeduction"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"5"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Bonus Depr?"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
CheckBox
IsChecked
=
"{Binding TakeBonusDepr, Mode=TwoWay}"
Content
=
""
Margin
=
"5,0,0,0"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"6"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Orig Units"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtOriginalQuantity"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
IsEnabled
=
"{Binding AllowUnits}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"OriginalQuantity"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0"
Max
=
"100000000"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"6"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Hours Use"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtPurchaseHoursUse"
Mask
=
"#7.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
IsEnabled
=
"{Binding AllowHoursUse}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"PurchaseHoursUse"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0"
Max
=
"1000000"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"7"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Mgmt Method"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddMgmtMethods"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding MgmtClassBookMethodID, Mode=TwoWay}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"ClassBookMethodID"
IsEditable
=
"True"
ItemsSource
=
"{Binding MgmtClassBookMethods}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"7"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Tax Method"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddTaxMethods"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding TaxClassBookMethodID, Mode=TwoWay}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"ClassBookMethodID"
IsEditable
=
"True"
ItemsSource
=
"{Binding TaxClassBookMethods}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"8"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Related Asset"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBox
x:Name
=
"txtRelatedAssetNbr"
VerticalAlignment
=
"Center"
Text
=
"{Binding RelatedAssetNbr, Mode=TwoWay}"
Width
=
"{StaticResource XSmallLabelWidth}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"8"
Grid.Column
=
"1"
Margin
=
"0,10,0,5"
Style
=
"{StaticResource ShowDeprEntity}"
>
<
TextBlock
Text
=
"Entity"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddDeprEntity"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding DeprEntityID, Mode=TwoWay}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"DeprEntityID"
IsEditable
=
"True"
ItemsSource
=
"{Binding DeprEntities}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"9"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Previously Purchased?"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
CheckBox
IsChecked
=
"{Binding PreviouslyPurchased, Mode=TwoWay}"
Content
=
""
Margin
=
"5,0,0,0"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"10"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowPreviouslyPurchased}"
>
<
TextBlock
Text
=
"Start Depr Year"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtBeginningYear"
Mask
=
"#4"
FormatString
=
"0000"
Width
=
"{StaticResource SmallLabelWidth}"
Margin
=
"0,0,0,0"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
AutoFillNumberGroupSeparators
=
"False"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"BeginningYear"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:YearValidationRule
Min
=
"2000"
Max
=
"2050"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"10"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowPreviouslyPurchased}"
>
<
TextBlock
Text
=
"Prior Depr"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtPriorDepr"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"PriorDepr"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"11"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowPreviouslyPurchased}"
>
<
TextBlock
Text
=
"1st Yr Conv"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddAveragingConvention"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding AveragingConventionID, Mode=TwoWay}"
DisplayMemberPath
=
"DomainValue"
VerticalAlignment
=
"Center"
SelectedValuePath
=
"DVID"
IsEditable
=
"True"
ItemsSource
=
"{Binding AveragingConventions}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadDataForm.EditTemplate
>
<!-- NEW ITEM -->
<
telerik:RadDataForm.NewItemTemplate
>
<
DataTemplate
>
<
Grid
VerticalAlignment
=
"Stretch"
Margin
=
"5, 5, 5, 5"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"250"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"280"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Add Asset"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Style
=
"{StaticResource DataFormHeaderStyle}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Asset Nbr"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBox
x:Name
=
"txtAssetNbr"
Text
=
"{Binding AssetNbr, Mode=TwoWay}"
Width
=
"{StaticResource XSmallLabelWidth}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"2"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"ATIGD"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddATIGD"
MinWidth
=
"{StaticResource DropDownWidth}"
Width
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding AssetTransactionCodeID, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
DisplayMemberPath
=
"CodeDescription"
SelectedValuePath
=
"AssetTransactionCodeID"
IsEditable
=
"True"
ItemsSource
=
"{Binding TransactionCodes}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"2"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Description"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedTextInput
x:Name
=
"txtDescription"
Mask
=
""
Width
=
"{StaticResource LargeLabelWidth}"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
TextMode
=
"PlainText"
InputBehavior
=
"Replace"
SectionsNavigationMode
=
"None"
Value
=
"{Binding Description, Mode=TwoWay}"
UpdateValueEvent
=
"LostFocus"
>
</
telerikInput:RadMaskedTextInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"3"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Type"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddAssetType"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding AssetTypeID, Mode=TwoWay}"
DisplayMemberPath
=
"DomainValue"
SelectedValuePath
=
"DVID"
IsEditable
=
"True"
ItemsSource
=
"{Binding AssetTypes}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"3"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Orig Business %"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtBusinessPercent"
Mask
=
"p3.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
IsEnabled
=
"{Binding AllowBusPercent}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"BusinessPercent"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:PercentValidationRule
Min
=
"0.00"
Max
=
"100.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"4"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Service Date"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadDatePicker
x:Name
=
"txtInServiceDate"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadDatePicker.SelectedValue
>
<
Binding
Path
=
"InServiceDate"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DateValidationRule
>
<
imKDSHelper:DateValidationRule.ValidDateRange
>
<
imKDSHelper:DateRangeChecker
Minimum
=
"{Binding MinDate}"
Maximum
=
"{Binding MaxDate}"
></
imKDSHelper:DateRangeChecker
>
</
imKDSHelper:DateValidationRule.ValidDateRange
>
</
imKDSHelper:DateValidationRule
>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadDatePicker.SelectedValue
>
</
telerikInput:RadDatePicker
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"4"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Cost"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtOriginalCost"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"OriginalCost"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"5"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Section 179"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtExpenseDeduction"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"ExpenseDeduction"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"5"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Bonus Depr?"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
CheckBox
IsChecked
=
"{Binding TakeBonusDepr, Mode=TwoWay}"
Content
=
""
Margin
=
"5,0,0,0"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"6"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Orig Units"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtOriginalQuantity"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
IsEnabled
=
"{Binding AllowUnits}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"OriginalQuantity"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0"
Max
=
"100000000"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"6"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Hours Use"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtPurchaseHoursUse"
Mask
=
"#7.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
IsEnabled
=
"{Binding AllowHoursUse}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"PurchaseHoursUse"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0"
Max
=
"1000000"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"7"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Mgmt Method"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddMgmtMethods"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding MgmtClassBookMethodID, Mode=TwoWay}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"ClassBookMethodID"
IsEditable
=
"True"
ItemsSource
=
"{Binding MgmtClassBookMethods}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"7"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Tax Method"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddTaxMethods"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding TaxClassBookMethodID, Mode=TwoWay}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"ClassBookMethodID"
IsEditable
=
"True"
ItemsSource
=
"{Binding TaxClassBookMethods}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"8"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Related Asset"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
TextBox
x:Name
=
"txtRelatedAssetNbr"
VerticalAlignment
=
"Center"
Text
=
"{Binding RelatedAssetNbr, Mode=TwoWay}"
Width
=
"{StaticResource XSmallLabelWidth}"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"8"
Grid.Column
=
"1"
Margin
=
"0,10,0,5"
Style
=
"{StaticResource ShowDeprEntity}"
>
<
TextBlock
Text
=
"Entity"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddDeprEntity"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding DeprEntityID, Mode=TwoWay}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"DeprEntityID"
IsEditable
=
"True"
ItemsSource
=
"{Binding DeprEntities}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"9"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
>
<
TextBlock
Text
=
"Previously Purchased?"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
CheckBox
IsChecked
=
"{Binding PreviouslyPurchased, Mode=TwoWay}"
Content
=
""
Margin
=
"5,0,0,0"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"10"
Grid.Column
=
"0"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowPreviouslyPurchased}"
>
<
TextBlock
Text
=
"Start Depr Year"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtBeginningYear"
Mask
=
"#4"
FormatString
=
"0000"
Width
=
"{StaticResource SmallLabelWidth}"
Margin
=
"0,0,0,0"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
AutoFillNumberGroupSeparators
=
"False"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"BeginningYear"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:YearValidationRule
Min
=
"2000"
Max
=
"2050"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"10"
Grid.Column
=
"1"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowPreviouslyPurchased}"
>
<
TextBlock
Text
=
"Prior Depr"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtPriorDepr"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"PriorDepr"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKDSHelper:DoubleValidationRule
Min
=
"0.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"11"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,0,5"
Style
=
"{StaticResource ShowPreviouslyPurchased}"
>
<
TextBlock
Text
=
"1st Yr Conv"
Margin
=
"0,0,0,0"
VerticalAlignment
=
"Center"
Width
=
"{StaticResource LabelWidth}"
Style
=
"{StaticResource LabelBoldStyle}"
/>
<
telerikInput:RadComboBox
x:Name
=
"ddAveragingConvention"
MinWidth
=
"{StaticResource DropDownWidth}"
SelectedValue
=
"{Binding AveragingConventionID, Mode=TwoWay}"
DisplayMemberPath
=
"DomainValue"
VerticalAlignment
=
"Center"
SelectedValuePath
=
"DVID"
IsEditable
=
"True"
ItemsSource
=
"{Binding AveragingConventions}"
>
</
telerikInput:RadComboBox
>
</
StackPanel
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadDataForm.NewItemTemplate
>
</
telerik:RadDataForm
>
0
Accepted
Hello Koren,
Kind regards,
Maya
the Telerik team
The easiest way would be to focus the element you want once it is loaded.
For example:
<
TextBox
x:Name
=
"txtAssetNbr"
Loaded
=
"txtAssetNbr_Loaded"
/>
private void txtAssetNbr_Loaded(object sender, RoutedEventArgs e)
{
(sender as FrameworkElement).Focus();
}
Kind regards,
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Koren
Top achievements
Rank 1
answered on 12 Sep 2012, 03:08 PM
Thank you. That worked perfectly.