This question is locked. New answers and comments are not allowed.
Hi
Is this possible to do this?
1.
Assuming I have a RadCombox bound to a collection of Account Objects
Each Account has 3 fields:
Id Number Description
1 6032 6032 Accounting
1 6714 6714 Banking
I want the user to be able to type into the Radcombobox(so i use IsEditableEnabled="True") but can't type anything wrong(so i set IsReadOnly="True"). During typing the drop down box will appear and filter out inappropriated results with the TextSearchMode="Contains". So i set IsFilterable="True" and OpenDropDownOnFocus="True").
The TextSearchMode should let us search words in the Description
The dropdown box should show all of the available Description. So i set ItemTemplate to a textbox which has Text's property binds to the Description.
After clicking on one of the the drop down item, the selectedValue should be bound to Id . So i set SelectedValuePath = "Id". However, the displayed value on the input area should be the {Number}.
Basically, i want to have the selected value of Id but the displayed value on the input area is the value of Number. The dropdown will show Descriptions and the Search Mode will let me search basing on Description (not Number)
(I check ur Demo and it didn't match my case)
2.
I want to have an autocomplete column in my radgridview with the above feature(1). I tried with the GridViewComboBoxColumn
but don't see the setting for TextSearchMode so i do a custom Column with RadCombobox template. However, for the custom column Do i need to implement both CellTemplate and CellEditTemplate(with exactly the same code)?? because if i only implement one of them then one of the mode won't show the RadCombobox after i clicking insert a new row in the GridView.
For example, if i only implement the CellTemplate with RadCombobox inside then after pressing the Insert button to insert a new row. The template column only show an empty Textbox(not the RadCombobox) because it is in Edit Mode now. But if i only implement the CellEditTemplate, then in the non Edit Mode, it won't show anything.
One more bug:
After clicking an item in the dropdown list, the cursor automatically move to the next two columns and that will make my grid always pop up the error message because there is one missing cell not fill out yet. How can i stop the cursor automatically move to the next column?
Is this possible to have the above feature(1) with GridViewComboBoxColumn
?
This is the attempt for my implementation. After finishing input the value of Account, Department, the cursor automatically moves to the Transaction Date(skip the Reference Number and Description column). That makes the error message pops up
thank you
Is this possible to do this?
1.
Assuming I have a RadCombox bound to a collection of Account Objects
Each Account has 3 fields:
Id Number Description
1 6032 6032 Accounting
1 6714 6714 Banking
I want the user to be able to type into the Radcombobox(so i use IsEditableEnabled="True") but can't type anything wrong(so i set IsReadOnly="True"). During typing the drop down box will appear and filter out inappropriated results with the TextSearchMode="Contains". So i set IsFilterable="True" and OpenDropDownOnFocus="True").
The TextSearchMode should let us search words in the Description
The dropdown box should show all of the available Description. So i set ItemTemplate to a textbox which has Text's property binds to the Description.
After clicking on one of the the drop down item, the selectedValue should be bound to Id . So i set SelectedValuePath = "Id". However, the displayed value on the input area should be the {Number}.
Basically, i want to have the selected value of Id but the displayed value on the input area is the value of Number. The dropdown will show Descriptions and the Search Mode will let me search basing on Description (not Number)
(I check ur Demo and it didn't match my case)
2.
I want to have an autocomplete column in my radgridview with the above feature(1). I tried with the GridViewComboBoxColumn
but don't see the setting for TextSearchMode so i do a custom Column with RadCombobox template. However, for the custom column Do i need to implement both CellTemplate and CellEditTemplate(with exactly the same code)?? because if i only implement one of them then one of the mode won't show the RadCombobox after i clicking insert a new row in the GridView.
For example, if i only implement the CellTemplate with RadCombobox inside then after pressing the Insert button to insert a new row. The template column only show an empty Textbox(not the RadCombobox) because it is in Edit Mode now. But if i only implement the CellEditTemplate, then in the non Edit Mode, it won't show anything.
One more bug:
After clicking an item in the dropdown list, the cursor automatically move to the next two columns and that will make my grid always pop up the error message because there is one missing cell not fill out yet. How can i stop the cursor automatically move to the next column?
Is this possible to have the above feature(1) with GridViewComboBoxColumn
?
This is the attempt for my implementation. After finishing input the value of Account, Department, the cursor automatically moves to the Transaction Date(skip the Reference Number and Description column). That makes the error message pops up
<
telerik:RadGridView
Grid.ColumnSpan
=
"7"
Grid.Row
=
"3"
ItemsSource
=
"{Binding ElementName=documentLineDomainDataSource, Path=Data}"
Name
=
"documentLineRadGridView"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
DataLoadMode
=
"Asynchronous"
RowEditEnded
=
"documentLineRadGridView_RowEditEnded"
AddingNewDataItem
=
"documentLineRadGridView_AddingNewDataItem"
IsSynchronizedWithCurrentItem
=
"false"
Deleted
=
"documentLineRadGridView_Deleted"
ShowColumnFooters
=
"True"
Height
=
"281"
VerticalAlignment
=
"Top"
>
<
telerik:RadGridView.Columns
>
<!--AutocompleteBox radcombobox for the FinancialAccountId-->
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FinancialAccountId, Mode=TwoWay}"
Header
=
"Account"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
ItemsSource
=
"{Binding ListofFinancialAccount, Source={StaticResource financialAccountList}}"
ItemTemplate
=
"{StaticResource FAComboBoxCustomTemplate}"
telerik:TextSearch.TextPath
=
"AccountNumber"
SelectedValuePath
=
"FinancialAccountId"
SelectedValue
=
"{Binding FinancialAccountId, Mode=TwoWay}"
IsEditable
=
"True"
IsFilteringEnabled
=
"True"
TextSearchMode
=
"Contains"
IsReadOnly
=
"True"
OpenDropDownOnFocus
=
"True"
>
<
telerik:RadComboBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
VirtualizingStackPanel
/>
</
ItemsPanelTemplate
>
</
telerik:RadComboBox.ItemsPanel
>
</
telerik:RadComboBox
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
ItemsSource
=
"{Binding ListofFinancialAccount, Source={StaticResource financialAccountList}}"
ItemTemplate
=
"{StaticResource FAComboBoxCustomTemplate}"
telerik:TextSearch.TextPath
=
"AccountNumber"
SelectedValuePath
=
"FinancialAccountId"
SelectedValue
=
"{Binding FinancialAccountId, Mode=TwoWay}"
IsEditable
=
"True"
IsFilteringEnabled
=
"True"
TextSearchMode
=
"Contains"
IsReadOnly
=
"True"
OpenDropDownOnFocus
=
"True"
>
<
telerik:RadComboBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
VirtualizingStackPanel
/>
</
ItemsPanelTemplate
>
</
telerik:RadComboBox.ItemsPanel
>
</
telerik:RadComboBox
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
<!--AutocompleteBox radcombobox for the FinancialDepartmentId-->
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FinancialDepartmentId, Mode=TwoWay}"
Header
=
"Department"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
ItemsSource
=
"{Binding ListofFinancialDepartment, Source={StaticResource financialDepartmentList}}"
ItemTemplate
=
"{StaticResource FDComboBoxCustomTemplate}"
telerik:TextSearch.TextPath
=
"DepartmentNumber"
SelectedValuePath
=
"FinancialDepartmentId"
SelectedValue
=
"{Binding FinancialDepartmentId, Mode=TwoWay}"
IsEditable
=
"True"
IsFilteringEnabled
=
"True"
TextSearchMode
=
"Contains"
IsReadOnly
=
"True"
OpenDropDownOnFocus
=
"True"
>
<
telerik:RadComboBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
VirtualizingStackPanel
/>
</
ItemsPanelTemplate
>
</
telerik:RadComboBox.ItemsPanel
>
</
telerik:RadComboBox
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
ItemsSource
=
"{Binding ListofFinancialDepartment, Source={StaticResource financialDepartmentList}}"
ItemTemplate
=
"{StaticResource FDComboBoxCustomTemplate}"
telerik:TextSearch.TextPath
=
"DepartmentNumber"
SelectedValuePath
=
"FinancialDepartmentId"
SelectedValue
=
"{Binding FinancialDepartmentId, Mode=TwoWay}"
IsEditable
=
"True"
IsFilteringEnabled
=
"True"
TextSearchMode
=
"Contains"
IsReadOnly
=
"True"
OpenDropDownOnFocus
=
"True"
>
<
telerik:RadComboBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
VirtualizingStackPanel
/>
</
ItemsPanelTemplate
>
</
telerik:RadComboBox.ItemsPanel
>
</
telerik:RadComboBox
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ReferenceNumber, Mode=TwoWay}"
Header
=
"Reference Number"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding TransactionDescription, Mode=TwoWay}"
Header
=
"Description"
/>
<!--Transaction Date Header with footer implementation-->
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding TransactionDate, Mode=TwoWay}"
Header
=
"Transaction Date"
DataFormatString
=
"{}{0:d}"
>
<
telerik:GridViewDataColumn.Footer
>
<
StackPanel
Orientation
=
"Vertical"
>
<
TextBlock
Text
=
"Total:"
/>
<
TextBlock
Text
=
"Balance:"
/>
</
StackPanel
>
</
telerik:GridViewDataColumn.Footer
>
</
telerik:GridViewDataColumn
>
thank you