Telerik Forums
UI for WinForms Forum
1 answer
148 views

So I want the user to choose a time with an interval of 15 mins, I disabled key presses because their is no proper way to handle it to round up to the nearest 15 mins.

Anyways my issue is that I tried using this setup so that the user can easily pick 15 mins interval

      this.ReturnTimePicker.Step = 15;
      this.ReturnTimePicker.TimeTables = Telerik.WinControls.UI.TimeTables.HoursAndMinutesInOneTable;

The result looks like this

So ok, probably a bug or 15 mins is not supported because of how many the choices would be.

So now I decided just to use the 2 tables instead of 1.


  this.ReturnTimePicker.Step = 15;
  this.ReturnTimePicker.TimeTables = Telerik.WinControls.UI.TimeTables.HoursAndMinutesInTwoTables;

The result is

It technically works and it's great but as you can see the Minutes is hidden, I need to drag the popup so it opens up properly.

I don't want my users to do that every time, so I want the control to be already expanded fully

Any fixes or alternatives on this issues? 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Sep 2022
1 answer
118 views

Hi ,

I need to create RadContextMenuManager programmatically in a "base" RadForm ( wich is inherited by other Forms Classes).

I don't want to add it with the designer.

It's possible?

If i add a property RadContextMenuManager, i cannot see this.RadContextMenu .

Alessandro

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Sep 2022
1 answer
105 views

Can I add a textbox on the map filled in a color of my choice just like in the attached photo ?

 

 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Sep 2022
1 answer
96 views

Hello community!!!

Every time I click on a RadDropDownList I get this message into my debug output window:

The thread 0x588c has exited with code 0 (0x0).
The 0x588c changes every time.

Any idea why is this happening? Is this a normal behavior of RadDropDownList or something?

Thank you for your time!!!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Sep 2022
1 answer
122 views
I'm populating the RadDataGridView via setting up the columns, then suppling an array of objects for each row I need to add. I can't use a bound grid as we need columns that are not actual values of the object (for example View/Edit buttons that then open the record for the user). I cannot run this in a virtual grid as we are using the grouping functionality to allow users to organize the data. Currently populating the grid takes over half the time of the process. Anyone have additional suggestion for things to try?
 public void AdvancedRowsPopulation(IList<object[]> rows, bool doReset = true)
        {
            var tmr = System.Diagnostics.Stopwatch.StartNew();
            radGridView1.BeginUpdate();
//Have to reset the columns so the object[] matches up again
            string settings = GetGridXml();
            SetGridToXML(BaseGridSettingsXML);
            DetachColumnListeners();
            tmr.Stop();
            Log.Info($"Grid to default took {tmr.ElapsedMilliseconds / 1000.0}s.");

            tmr = System.Diagnostics.Stopwatch.StartNew();
            if (doReset)
            {
                radGridView1.Rows.Clear();
                cachedRows = new List<object[]>();
                lastDataSet = new DataTable();
                foreach (var col in radGridView1.Columns) lastDataSet.Columns.Add(col.HeaderText);
            }
            for (int y=0;y<rows.Count;y++)
            {
                var row =rows[y];
                radGridView1.Rows.Add(row);
                lastDataSet.Rows.Add(row);
            }
            lblDataCount.Text = radGridView1.Rows.Count.ToString();
            tmr.Stop();
            Log.Info($"Grid Row Population took {tmr.ElapsedMilliseconds / 1000.0}s.");

            tmr = System.Diagnostics.Stopwatch.StartNew();
            BaseGridSettingsXML = GetGridXml();
//Set grid back to what the user had last seen
            SetGridToXML(settings);

            radGridView1.EndUpdate();
            tmr.Stop();
            Log.Info($"Grid to user's layout took {tmr.ElapsedMilliseconds / 1000.0}s.");
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Sep 2022
1 answer
119 views


hello, I want to show a form in settings pane, but the form is much larger, so  I need to resize it . But

radDiagram1.DiagramElement.SettingsPane.Size doesn't work. How can I make this work ? Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Sep 2022
1 answer
101 views

Hello,

i am using the mdi functionality in my winforms app. If i open a childform in maximized state, the text of the childform will appear in the text of the parent mdi form. How can i disable this so that the text of the parent mdi form will always stay the same?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Sep 2022
1 answer
885 views
Whenever a sort filter is applied to my radgridview, it holds the selectedItem and scrolls to it further down in the list.  How to I programatically scroll to the top or disable this from jumping to the selected item? (Sorting is pre-set in the UI component, not programmatic)

Thanks!
Maria
Telerik team
 answered on 02 Sep 2022
2 answers
589 views
Hello Team,
  we are using the Radgrid in our application. we need to change the cell select/focus color change on gridview.  
  
  Actual required
      
I need to change the blue color with dark blue border in cell selected highlighter on the grid focus and I need to change the yellow color in grid focus out. we have added the screenshot for your reference. Please help us. 
 
Screenshot : https://prnt.sc/X529hq6pL0Uz
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Sep 2022
1 answer
117 views

.NET Framework 4.8

Telerik 2022 R1 

 

There are two conditional cell formats: one for the command cell and another for a checkbox. 

The formatting for the command cell works without issue.  However, for the unavailable column the formatting is applied to other cells and even other columns regardless of the value which is needed. 

Only the first two rows, "1 Giant Slice" and "10inch Small", should have the unavailable cells in red.  These two rows are consistently formatted correctly, but other rows have both unavailable and available cells formatted in red, too.  The rows which have incorrect formatted do not seem to be consistent. 

The debugger and logging the values of the data bound item shows that the proper values are there and only.

e.g.

only the two items and for the proper column are processed by the if statement that applies formatting to the unavailable cell (line 134 in form).
2022-09-01 10:26:08.749  [DEBUG]  Item: 1 Giant Slice  -  Next Available: [01/01/2024 12:30:00]  -  Column Name: Unavailable
2022-09-01 10:26:08.761  [DEBUG]  Item: 10inch Small  -  Next Available: [01/01/2024 12:30:00]  -  Column Name: Unavailable

I've attached a sample project with some sample JSON data that is loaded when the Form Load event is handled. 

 

There has to be something I'm doing wrong but I just can't figure out what it is.

Any help would be most appreciated. TIA

 

Cell formatting event handler:


        private void Dgv_MenuItems_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (_isFiltering)
            {
                return;
            }
            
            if (sender is GridCommandCellElement cellElement)
            {
                var row = dgv_MenuItems.Rows[e.RowIndex];
                var boundObj = (MenuItemAvailabilityModel)row.DataBoundItem;

                //This conditional formatting works without issue
                if (boundObj.CustomAvailability.Count > 0)
                {
                    cellElement.CommandButton.Text = "Change";
                    cellElement.CommandButton.ButtonFillElement.BackColor = Color.LightGreen;
                }
                else
                {
                    cellElement.CommandButton.Text = "Add";
                    cellElement.CommandButton.ButtonFillElement.BackColor = default;
                }
            }
            else if (e.Column.Name == nameof(MenuItemAvailabilityModel.Unavailable))
            {
                var row = dgv_MenuItems.Rows[e.RowIndex];
                var boundObj = (MenuItemAvailabilityModel)row.DataBoundItem;

                //This conditional formatting is applied to cells for which no NextAvailable is set in the data
                if (boundObj.NextAvailableAt.HasValue && boundObj.NextAvailableAt.Value > DateTime.Now)
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.BackColor = Color.Red;
                    e.CellElement.NumberOfColors = 1;
                }
            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Sep 2022
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?