Hello Marco,
Thank you for writing back.
Currently, we are experiencing an issue with the attachments in the public forums. Please excuse us for the inconvenience caused.The problem will be addressed as soon as possible.
You can find below the complete code snippet that the project contains:
private
void
Form1_Load(
object
sender, EventArgs e)
{
this
.customersTableAdapter.Fill(
this
.nwindDataSet.Customers);
this
.radGridView1.DataSource =
this
.customersBindingSource;
radGridView1.EditorRequired += radGridView1_EditorRequired;
radGridView1.CellEditorInitialized += radGridView1_CellEditorInitialized;
radGridView1.AutoSizeRows =
true
;
}
void
radGridView1_EditorRequired(
object
sender, Telerik.WinControls.UI.EditorRequiredEventArgs e)
{
if
(radGridView1.CurrentColumn.Name ==
"Country"
)
{
e.Editor =
new
MyAutoCompleteEditor();
}
}
void
radGridView1_CellEditorInitialized(
object
sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
if
(e.ActiveEditor
is
MyAutoCompleteEditor)
{
DataTable uniqueCountries = nwindDataSet.Tables[0].DefaultView.ToTable(
true
,
"Country"
);
MyAutoCompleteEditor editor = (MyAutoCompleteEditor)e.ActiveEditor;
RadAutoCompleteBoxElement element = (RadAutoCompleteBoxElement)editor.EditorElement;
element.Delimiter =
' '
;
element.AutoCompleteDataSource = uniqueCountries;
element.AutoCompleteDisplayMember =
"Country"
;
element.AutoCompleteValueMember =
"Country"
;
}
}
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this
blog post and share your thoughts.