I have a list of people in a datatable that I bind to a RadCheckedDropDown list via a bindingsource. This control is sited on the first page of a tab control. It's a list that provides the app user with a definable selection of staff members for a report.
On initialization of the form, only one item is selected, but as a test I check all items in the dropdown then move to the 2nd page of the tab control. If I then return to the first tab, the checkeddropdown list has returned to displaying only the initial single checked item .
I placed a breakpoint in my code and the dataset hasn't changed, ie the "Include" field still remains set to false for all rows except that initial row. ie checking items in the list aren't being reflected in the dataset. See untitled2.png
Have I failed to do something ?
// // CmbStaffFilter // this.CmbStaffFilter.CheckedMember = "Include"; this.CmbStaffFilter.DataSource = this.bsStaffFilter; this.CmbStaffFilter.DisplayMember = "Fullname"; this.CmbStaffFilter.ItemHeight = 32; this.CmbStaffFilter.Location = new System.Drawing.Point(29, 35); this.CmbStaffFilter.Name = "CmbStaffFilter"; this.CmbStaffFilter.ShowCheckAllItems = true; this.CmbStaffFilter.Size = new System.Drawing.Size(444, 20); this.CmbStaffFilter.TabIndex = 121; this.CmbStaffFilter.ValueMember = "RecId"; // // bsStaffFilter // this.bsStaffFilter.DataSource = typeof(pulse.move.datasources.dsFilterStaff.dtFilterStaffDataTable);
When I click on a RadCheckedDropDownList, type something, and then click on another RadCheckedDropDownList control, it types into the first control I typed into (not the one I clicked on). I already have Focus() in all the click events and it's not working.
Are there coding samples somewhere to give me an idea of how to write selections made in a RadCheckedDropDownList, which is inside a RadGridView, back to a database?
Thank you.
I'm using Winforms and need a raddatagrid to show a person's name and what accounts they can view.
Name is from one datasource and Accounts will be from another. The Accounts will be in the RadCheckedDropDownList.
Following this example, I was able to add just the Accounts to the grid. I cannot figure out how to add the Name column.
Any help would be appreciated.
Thanks.
I have a WinForm with multiple controls that are bound to an management object. Once of the controls is a RadCheckedDropDownList that is bound to a single object property containing a bitwise value, something like this:
2, 'None'
4, 'Mornings'
8, 'Afternoon'
16, 'Evenings'
32, 'Anytime'
Using bitwise values I plan to store, say, 24 in the field if the user chooses Afternoons and Evenings. What I cannot figure out is how to bind this to the object property. if there a direct way to do this or will it need to be handled in the UI. Can I bind it as directly as I can, say, a string or in value that goes to a single property? Do you have sample code for such an approach?
Thanks
Carl
Is there a Winforms example of a RadCheckedDropDownList as an Editor for a PropertyGrid?
There is a sample for WPF, https://docs.telerik.com/devtools/wpf/controls/radpropertygrid/features/radenumeditor
There is sample for Winforms Gridview, https://docs.telerik.com/devtools/winforms/controls/dropdown-listcontrol-and-checkeddropdownlist/checkeddropdownlist/how-to/use-as-radgridview-editor
but nothing for Winforms PropertyGrid.
How would I get the following to appear as a checked drop down editor inside a property grid in winforms?
using CommunityToolkit.Mvvm.ComponentModel; namespace ProjectXYZ.Model.Enums; public enum BroadcastPlanEnum { Plan1, Plan2, Plan3, Plan4, Plan5, Plan6 } public sealed partial class BroadcastPlanActive : ObservableObject { [ObservableProperty] private BroadcastPlanEnum broadcastPlan; [ObservableProperty] private bool selected; }
I have a list of items for a checkeddropdownlist, I don't want the user to be able to type in the dropdown. I'd like for them to ONLY be able to uncheck/check items I've predefined.
Essentially, I want what you do with the dropDownStyle property set to DropDownList for normal dropdownlist controls.
I want to implement my own version of load on demand feature for RadCheckedDropDownList (if there's already one that meets my requirements then sorry for posting).
When the RadCheckedDropDownList's OnKeyUp event happens for alphanumeric char I want to send async request to my ASP.NET Web Service - when webservice's request is completed I want to either (both options are viable for me):
a) add new items (that are not already existing) to the DataSource,
b) save somewhere items that are already checked and load items to the DataSource,
and show Popup scrolled to the item that is matching the text that already user inserted into RadCheckedDropDownList's RadCheckedDropDownListEditableAreaElement.
My code so far:
private void LoadOnDemandCompleted( object sender, GetDropDownMenuItemsPagedCompletedEventArgs e )
{
//RadCheckedDropDownListOnDemand - my class that inherits RadCheckedDropDownList
if ( e.Error != null || e.Result == null || (int)e.UserState != this.RadCheckedDropDownListOnDemand.RequestId )
{
//WS call errored out, nothing was returned, or the request number is not matching
return;
}
if ( !( this.RadCheckedDropDownListOnDemand.DataSource is List<RadCheckedListDataItem> mainDataSource ) )
return;
//Properties explanation:
//Value == string to display
//Id == id in database
//ChoiceOrder - order in which the RadCheckedListDataItem should appear -> lower ChoiceOrder means it is higher on the list
var itemsFiltered = e.Result.Select( re => new RadCheckedListDataItem( re.Value )
{
Value = re.Id,
Tag = re.ChoiceOrder,
} )
.Where( item => !mainDataSource.Any( mainDataSourceItem => (int)item.Value == (int)mainDataSourceItem.Value ) )
.ToList();
//don not want to add items that are already existing in
if ( itemsFiltered.Count > 0 )
{
mainDataSource.AddRange( itemsFiltered );
//want to refresh item list for CheckedDropDownListElement
if ( !( this.RadCheckedDropDownListOnDemand.CheckedDropDownListElement.DataSource is List<RadCheckedListDataItem> listElementDataSource ) )
return;
listElementDataSource.AddRange( itemsFiltered );
//this does not show the newly added items
this.RadCheckedDropDownListOnDemand.CheckedDropDownListElement.ShowPopup();
}
}