Telerik Forums
UI for WinForms Forum
6 answers
1.1K+ views
Hi guys,

I have a customized grid where i change the type of the editorElement in one cell based on the value on another cell.
One of this editors are the RadDropDownListEditorElement. The displaymembers shows nicly when dropped down.
But when i choose one of the elements in the dropdown list, the dropdown closes and the valuemember is presented in the cell.

I need the valuemember in some operations after this, but i want the cell to show the displaymember. 

Here is the code in the CellEditorInitialized:

void TextCodeGridView_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    var editManager = sender as GridViewEditManager;
    var editor = editManager.ActiveEditor as RadDropDownListEditor;
 
    if (editor == null) return;
 
    var editorElement = ((RadDropDownListEditor)editor).EditorElement;
    switch (e.ColumnIndex)
    {
        case 0:
            var tcArray = _db.TCs.Where(t=>t.TC_GROUP_MEMBERs.Any(tcg=>tcg.TC_GROUP.LAND_IDX == Startup.CurrentConsultant.CountryId)).ToList();
            tcArray.Insert(0, null);
 
            ((RadDropDownListEditorElement)editorElement).DataSource = tcArray;
            ((RadDropDownListEditorElement)editorElement).DisplayMember = "TC1";
            ((RadDropDownListEditorElement)editorElement).ValueMember = "TC1"; ;
             
 
            if (this.TextCodeGridView.CurrentRow.Cells[0].Value == null)
                ((RadDropDownListEditorElement)editorElement).SelectedIndex = 0;
            else
                ((RadDropDownListEditorElement)editorElement).SelectedIndex = tcArray.IndexOf(_db.TCs.SingleOrDefault(t => t != null && t.TC1 == this.TextCodeGridView.CurrentRow.Cells[0].Value));
            break;
        case 1:
            var tclistArray = _db.TC_LISTs.Where(t => t != null && t.TC == this.TextCodeGridView.CurrentRow.Cells[0].Value).ToList();
            tclistArray.Insert(0, null);
 
            ((RadDropDownListEditorElement)editorElement).DataSource = tclistArray;
            ((RadDropDownListEditorElement)editorElement).DisplayMember = "TEXT";
            ((RadDropDownListEditorElement)editorElement).ValueMember = "VALUE"; ;
 
            ((RadDropDownListEditorElement)editorElement).SelectedIndex = tclistArray.IndexOf(tclistArray.SingleOrDefault(t => t != null && t.ISDEFAULT));
            this.TextCodeGridView.CurrentRow.Cells[1].Value = tclistArray.SingleOrDefault(t => t != null && t.ISDEFAULT).TEXT;
             
            break;
    }
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Nov 2020
1 answer
127 views

Hello all,

 

i am trying to follow the official tutorial considering custom items for the RadPropertyGrid (https://docs.telerik.com/devtools/winforms/controls/propertygrid/custom-items) in a Progress Openedge 11.7 environment. I set up a test project consisting of a Form that holds a RadPropertyGrid and a Button whose Click Event will set the SelectedObject of the RadPropertyGrid. All other classes are more or less exactly translated into OpenEdge code from the tutorial.

The problem appears to be the assignment of the "ItemElementType" in the custom CreateItemElement

On the line "e:ItemElementType = TypeHelper:GetType("CustomItemElement")." the client begins to fire the event again and cause an infinit loop of event calls.

 

I could provide the sample project as .7zip if you like. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Nov 2020
3 answers
363 views

HI,

   I tried to export from my winform radgridview data which contains view definition using example provided in link https://docs.telerik.com/devtools/winforms/controls/gridview/exporting-data/spread-export. Once I tried this code application is not compiling. There were no errors in output window when we carefully checked I found that there is an error related to SpreadExportRenderer. The error was "error BC30002: Type 'Telerik.WinControls.Export.SpreadExportRenderer' is not defined". My TelerikExport.dll version is 2016.1.216.20. Can you please help me out how to solve this issue.

 

Regards

Harsha D

 

Nadya | Tech Support Engineer
Telerik team
 answered on 04 Nov 2020
26 answers
653 views
can this be done?

I  enabled filtering on my command column buy setting

.AllowFiltering =

 

true

I also have a cellformatting event that will change the button text based on a date but I no longer am able to ref the cell.commandbutton as the cell type has changed from "GridCommandCellElement" to
 "GridFilterCellElement"

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Nov 2020
1 answer
265 views

Hi

This code correctly changes the name of the tab after a myUserControl is added.
How can I change the title of the selected tab anywhere in the program without calling RadTabbedFormControlEventArgs e?

code snippet:

private void radTabbedFormControl1_TabAdded(object sender, RadTabbedFormControlEventArgs e)
    {
        UserControl1 myUserControl = new UserControl1();
        myUserControl.Dock = DockStyle.Fill;
        e.Tab.Controls.Add(myUserControl);
        e.Tab.Owner.SelectedTab = e.Tab;
        e.Tab.Text = myUserControl.this_title;
    }

 

Nadya | Tech Support Engineer
Telerik team
 answered on 02 Nov 2020
1 answer
178 views

Hi

How to change the icon and title of the selected tab while running the program?

Nadya | Tech Support Engineer
Telerik team
 answered on 02 Nov 2020
1 answer
586 views

Hi

When the program start one tab is open by default. How do i close that and open my tab dynamically?

Nadya | Tech Support Engineer
Telerik team
 answered on 02 Nov 2020
5 answers
199 views

Is there a way to do this? I don't see a way to set any defaults (Status, Reminder Time, Background, Resource, etc).

I can populate the various lists with custom options, but not set any of them by default.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Nov 2020
6 answers
1.9K+ views

Hi,

There are a few articles/posts that seem to have answer and resolved this issue but in actual fact, I still cannot get this feature to work with Telerik RadGridView.

So I appreciate your help.

 

I've implemented a working version of this example: https://docs.telerik.com/devtools/winforms/controls/gridview/rows/drag-and-drop

I now want to handle DragEnter & DragOver events for the target grids.

I've read all relevant articles but none seem to work. The events do not fire!

Could you provide a working source code for the article above where the two events do actually fire please?

The only way I could get this to work is by using Microsoft's Control.DoDragDrop method which is I know is not the correct way as it mixes Telerik's and Microsoft's approaches.

Thanks

Arash
Top achievements
Rank 1
Veteran
 answered on 31 Oct 2020
2 answers
123 views

Hello,

I have a hard time trying to customize a group header. I use something like this:

this.layoutControlGroupItem1.HeaderElement.BackColor = ColorTranslator.FromHtml("#008de7");

this.layoutControlGroupItem1.HeaderElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;

this.layoutControlGroupItem1.HeaderElement.HeaderButtonElement.DrawFill = false;

It works fine. But if I want to load a custom layout using RadLayoutCountrol's LoadLayout first, then this code does nothing...

I must be missing something elementary...

Thanks in advance for help

 

Tomáš
Top achievements
Rank 1
Iron
 answered on 30 Oct 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?