this.radCheckedDropDownList1.ShowCheckAllItems = true; for (int i = 0; i < 100; i++) { this.radCheckedDropDownList1.Items.Add("Item" + i); } Workaround: this.radCheckedDropDownList1.ItemCheckedChanging += radCheckedDropDownList1_ItemCheckedChanging; private void radCheckedDropDownList1_ItemCheckedChanging(object sender, Telerik.WinControls.UI.RadCheckedListDataItemCancelEventArgs e) { if (e.Item == this.radCheckedDropDownList1.CheckedDropDownListElement.CheckAllItem) { e.Cancel = true; this.radCheckedDropDownList1.ItemCheckedChanging -= radCheckedDropDownList1_ItemCheckedChanging; this.radCheckedDropDownList1.CheckedDropDownListElement.BeginUpdate(); e.Item.Checked = !e.Item.Checked; StringBuilder sb = new StringBuilder(); foreach (RadCheckedListDataItem item in this.radCheckedDropDownList1.Items) { item.Checked = e.Item.Checked; if (item.Checked) { sb.Append(item.Text + ";"); } } this.radCheckedDropDownList1.CheckedDropDownListElement.EditableElementText = sb.ToString(); this.radCheckedDropDownList1.CheckedDropDownListElement.EndUpdate(); this.radCheckedDropDownList1.ItemCheckedChanging += radCheckedDropDownList1_ItemCheckedChanging; } }
To reproduce: - set the alignment like this: radCheckedListBox1.CheckBoxesPosition = Telerik.WinControls.UI.CheckBoxesPosition.Top; radCheckedListBox1.CheckBoxesAlignment = Telerik.WinControls.UI.CheckBoxesAlignment.Near; Workaround: void radListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { DetailListViewVisualItem item = e.VisualItem as DetailListViewVisualItem; if (item != null) { var checkBox = item.Children[0] as ListViewItemCheckbox; checkBox.PositionOffset = new SizeF(0, - (radCheckedListBox1.ItemSize.Height /2 - checkBox.Size.Height/2)); } }
To reproduce: - Add RadListView with some items to a form, change the theme to Aqua. - Start the application and edit the item text. To workaround the issue you should apply a black font to the RadTextBoxElement in Visual Style Builder
To reproduce: use the following code snippet: List<Item> items = new List<Item>(); public Form1() { InitializeComponent(); for (int i = 0; i < 10; i++) { items.Add(new Item("Item" + i)); } this.radListView1.DataSource = items; this.radListView1.DisplayMember = "Title"; this.radButton1.Click += radButton1_Click; } public class Item { public string Title { get; set; } public Item(string title) { this.Title = title; } } private void radButton1_Click(object sender, EventArgs e) { if (this.radListView1.SelectedItem != null) { items.Remove(this.radListView1.SelectedItem.DataBoundItem as Item); this.radListView1.DataSource = null; this.radListView1.DataSource = items; this.radListView1.DisplayMember = "Title"; } } Steps: 1. Select the first item and click the button. 2. Select the last item and click the button again. As a result, an ArgumentOutOfRangeException is thrown. Workaround: use BindingList instead of List
Note: in data bound scenario, when setting the DescriptionTextMember property, DescriptionTextListDataItems should be created. Workaround: use custom items: private void radCheckedDropDownList1_CreatingVisualListItem(object sender, CreatingVisualListItemEventArgs args) { args.VisualItem = new CustomRadListVisualItem(); } public class CustomRadListVisualItem : RadCheckedListVisualItem { protected override Type ThemeEffectiveType { get { return typeof(RadListVisualItem); } } LightVisualElement description = new LightVisualElement(); protected override void CreateChildElements() { base.CreateChildElements(); StackLayoutPanel stack = this.Children.First() as StackLayoutPanel; description.ForeColor = Color.Gray; stack.Children.Add(description); } public override void Synchronize() { base.Synchronize(); RadCheckedListDataItem dataItem = (RadCheckedListDataItem)this.Data; if (dataItem != null) { DataRowView drv = dataItem.DataBoundItem as DataRowView; if (drv != null) { description.Text = drv.Row[dataItem.Owner.DescriptionTextMember] + ""; } } } }
To reproduce: radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteMode = AutoCompleteMode.SuggestAppend; radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteSuggest.SuggestMode = SuggestMode.Contains;
To reproduce: use the following code snippet and click the button public Form1() { InitializeComponent(); this.radListView1.VisualItemCreating += radListView1_VisualItemCreating; this.radListView1.ViewType = ListViewType.DetailsView; radListView1.ItemSize = new Size(0, 56); Populate(); } private void radListView1_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e) { e.VisualItem = new CustomDetailListViewVisualItem(); } private void radButton1_Click(object sender, EventArgs e) { Populate(); } private void Populate() { this.radListView1.Items.Clear(); this.radListView1.BeginUpdate(); for (int i = 0; i < 5; i++) { ListViewDataItem lvdi = new ListViewDataItem(); if (i == -1 || i > radListView1.Items.Count || radListView1.Items.Count == 0) { radListView1.Items.Add(lvdi); } else { radListView1.Items.Insert(i, lvdi); } } this.radListView1.EndUpdate(); } public class CustomDetailListViewVisualItem : DetailListViewVisualItem { RadTextBoxElement tb = new RadTextBoxElement(); protected override void CreateChildElements() { base.CreateChildElements(); this.Children.Add(tb); } protected override Type ThemeEffectiveType { get { return typeof(DetailListViewVisualItem); } } } Workaround: use RadTextBoxControlElement instaed of RadTextBoxElement.
To reproduce: - Show a form with RadListView in it upon a button click. - Clos the form in the DoubleClick event handler of the list view. Workaround: - Use ItemMouseDoubleClick event instead.
To reproduce: 1. Add RadCheckedDropDownList with few items 2. Subscribe to the ItemCheckedChanged event 3. In handler of event add the following code snippet: void radCheckedDropDownList1_ItemCheckedChanged(object sender, RadCheckedListDataItemEventArgs e) { this.radCheckedDropDownList1.Text = string.Format("Count {0}", radCheckedDropDownList1.CheckedItems.Count.ToString()); } 4. Open the drop down popup and you will see that can not check/uncheck any item. Workaround: 1. Subscribe to the TextChanged event of AutoCompleteEditableAreaElement and set the Text property: this.radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.TextChanged += AutoCompleteTextBox_TextChanged; void AutoCompleteTextBox_TextChanged(object sender, EventArgs e) { this.radCheckedDropDownList1.Text = string.Format("Count {0}", radCheckedDropDownList1.CheckedItems.Count.ToString()); }
To reproduce: use the following code snippet: public Form1() { InitializeComponent(); List<Item> items = new List<Item>(); for (int i = 0; i < 10; i++) { items.Add(new Item(i,"Item" + i)); } this.radListView1.DataSource = items; this.radListView1.AllowEdit = true; this.radListView1.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView; this.radListView1.ItemValidating += radListView1_ItemValidating; } public class Item { public double Id { get; set; } public string Name { get; set; } public Item(double id, string name) { this.Id = id; this.Name = name; } } If you try to edit "Item5" cell and press Enter key to confirm the value, the ListViewItemValidatingEventArgs.OldValue property in the ItemValidating does not show "Item5" which actually the old editor value. Workaround: Currently, the possible solution is to get the old value from the ListViewItemValidatingEventArgs.Item[e.ListViewElement.CurrentColumn]:
To reproduce: private void radButton1_Click(object sender, EventArgs e) { this.nwindDataSet.Products.Clear(); this.productsTableAdapter.Fill(this.nwindDataSet.Products); radListView1.DataSource = this.nwindDataSet.Products; } Workaround: private void radButton1_Click(object sender, EventArgs e) { this.nwindDataSet.Products.Clear(); this.productsTableAdapter.Fill(this.nwindDataSet.Products); radListView1.DataSource = null; radListView1.DataSource = this.nwindDataSet.Products; }
How to reproduce: public partial class RadForm1 : RadForm { public RadForm1() { InitializeComponent(); var __listViewDetailColumnName = new ListViewDetailColumn("columnHeader_name", "Name"); var __listViewDetailColumnType = new ListViewDetailColumn("columnHeader_type", "Type"); var __listViewDetailColumnDescription = new ListViewDetailColumn("columnHeader_description", "Description") { Width = 281F }; this.listView1.Columns.AddRange(new[] { __listViewDetailColumnName, __listViewDetailColumnType, __listViewDetailColumnDescription}); this.listView1.AllowEdit = false; this.listView1.AllowRemove = false; this.listView1.EnableColumnSort = true; this.listView1.EnableSorting = true; this.listView1.HeaderHeight = 25F; this.listView1.ItemSpacing = -1; this.listView1.KeyboardSearchEnabled = true; this.listView1.SelectLastAddedItem = false; this.listView1.ShowGridLines = true; var __sortDescriptor1 = new Telerik.WinControls.Data.SortDescriptor { PropertyName = __listViewDetailColumnName.Name, Direction = ListSortDirection.Ascending }; this.listView1.SortDescriptors.AddRange(new[] { __sortDescriptor1 }); this.listView1.ViewType = ListViewType.DetailsView; } private void buttonClose_Click(object sender, EventArgs e) { this.Close(); } private void buttonPopulateOk_Click(object sender, EventArgs e) { this.Populate(10000); } private void buttonPopulateError_Click(object sender, EventArgs e) { this.Populate(10001); } private void Populate(int count) { this.listView1.BeginUpdate(); this.listView1.Items.Clear(); for (var __i = 1; __i <= count; __i++) { var __name = String.Format(@"Item-{0:D5}", __i); var __type = String.Format(@"Type-{0:D5}", __i); var __description = String.Format(@"Description-{0:D5}", __i); var __item = new ListViewDataItem(__name); __item.SubItems.Add(__name); __item.SubItems.Add(__type); __item.SubItems.Add(__description); this.listView1.Items.Add(__item); } this.listView1.EndUpdate(); } } Workaround: after the addition of the items, set the current item and then add the sort descriptor public partial class RadForm1 : RadForm { ListViewDetailColumn __listViewDetailColumnName; public RadForm1() { InitializeComponent(); __listViewDetailColumnName = new ListViewDetailColumn("columnHeader_name", "Name"); var __listViewDetailColumnType = new ListViewDetailColumn("columnHeader_type", "Type"); var __listViewDetailColumnDescription = new ListViewDetailColumn("columnHeader_description", "Descripti { Width = 281F }; this.listView1.Columns.AddRange(new[] { __listViewDetailColumnName, __listViewDetailColumnType, __listViewDetailColumnDescription}); this.listView1.AllowEdit = false; this.listView1.AllowRemove = false; this.listView1.EnableColumnSort = true; this.listView1.EnableSorting = true; this.listView1.HeaderHeight = 25F; this.listView1.ItemSpacing = -1; this.listView1.KeyboardSearchEnabled = true; this.listView1.SelectLastAddedItem = false; this.listView1.ShowGridLines = true; this.listView1.ViewType = ListViewType.DetailsView; } private void buttonClose_Click(object sender, EventArgs e) { this.Close(); } private void buttonPopulateOk_Click(object sender, EventArgs e) { this.Populate(10000); } private void buttonPopulateError_Click(object sender, EventArgs e) { this.Populate(10001); } private void Populate(int count) { this.listView1.BeginUpdate(); this.listView1.Items.Clear(); for (var __i = 1; __i <= count; __i++) { var __name = String.Format(@"Item-{0:D5}", __i); var __type = String.Format(@"Type-{0:D5}", __i); var __description = String.Format(@"Description-{0:D5}", __i); var __item = new ListViewDataItem(__name); __item.SubItems.Add(__name); __item.SubItems.Add(__type); __item.SubItems.Add(__description); this.listView1.Items.Add(__item); } this.listView1.EndUpdate(); this.listView1.CurrentItem = this.listView1.Items[0]; var __sortDescriptor1 = new Telerik.WinControls.Data.SortDescriptor { PropertyName = __listViewDetailColumnName.Name, Direction = ListSortDirection.Ascending }; this.listView1.SortDescriptors.AddRange(new[] { __sortDescriptor1 }); this.listView1.CurrentItem = null; } }
To reproduce: - Bind the control to some data - Change the text like this: private void radButton1_Click(object sender, EventArgs e) { radCheckedDropDownList1.Text = "All;Privileged;"; } - Open the drop down. Workaround - Check the items directly: private void radButton1_Click(object sender, EventArgs e) { radCheckedDropDownList1.Items[0].Checked = true; radCheckedDropDownList1.Items[2].Checked = true; }
Similar functionality is available for RadTreeView: http://www.telerik.com/help/winforms/treeview-editing-editing-nodes.html
Currently, RadListView does not support drag and drop functionality when the lasso selection is enabled. Add functionality to support both of them similar to Windows Explorer.
The ASP suite alredy have this: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx?show-source=true
To reproduce: private BindingList<Model> dataSource = new BindingList<Model>(); private Random rnd = new Random(); public DataBinding1() { InitializeComponent(); this.radCheckedDropDownList1.CheckedMember = "Selected"; this.radCheckedDropDownList1.DisplayMember = "Name"; this.radCheckedDropDownList1.ValueMember = "Id"; for (int i = 0; i < 15; i++) { dataSource.Add(new Model { Id = i, Name = "Item " + i }); } } class Model : INotifyPropertyChanged { private int id; private bool selected; private string name; public int Id { get { return this.id; } set { this.id = value; this.OnPropertyChanged("Id"); } } public bool Selected { get { return this.selected; } set { this.selected = value; this.OnPropertyChanged("Selected"); } } public string Name { get { return this.name; } set { this.name = value; this.OnPropertyChanged("Name"); } } public event PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanged(string propName) { if (this.PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(propName)); } } }
To reproduce: public Form1() { InitializeComponent(); List<string> items = new List<string>(); StringBuilder sb; for (int i = 0; i < 10; i++) { sb = new StringBuilder(); for (int j = 0; j < 5; j++) { sb.Append(i + "." + j + ".some text"); } sb.Append(" END"); items.Add(sb.ToString()); } this.radCheckedListBox1.AllowArbitraryItemWidth = true; this.radCheckedListBox1.DataSource = items; } Workaround: measure the desired size for the longest string in the DataSource collection, e.g. by using TextRenderer.MeasureText method, and set the RadCheckedListBox.ItemSize property considering the check-box size as well.