Telerik Forums
UI for WinForms Forum
1 answer
230 views

Is there no API that basically provides?

It looked okay at first because it was implemented like the code below. However, pressing Next Button will not update on days other than that month.

        private void radCalendar1_ElementRender(object sender, RenderElementEventArgs e)
        {
            if (e.Day.Date.Year == DateTime.Now.Year
                && e.Day.Date.Month == DateTime.Now.Month
                && e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
                     e.Element.ForeColor = Color.Red;
        }

First

After, Next Button Click

 

Maria
Telerik team
 answered on 10 Oct 2022
2 answers
146 views

Hi,

 

I want to change the VALUE of the button button per row.

1) Look at this column to determine button value, (3) if tick I want to show "IFC->" and if not ticked I want to show "->IFC" ( For info : IFC stand for Interface Contract)

2) I also tried to add a column in the DATASOURCE. But struggle to make the field a button. This is also option I I can get this to be a button

 

               

    //*
                    //**********************************************************************************
                    //*
                    //*    The IFC Button
                    //*
                    //**********************************************************************************
                    //*
                    GridViewCommandColumn ifc_action = new GridViewCommandColumn();
                    ifc_action.HeaderText = "IFC Action";
                    ifc_action.DataType = typeof(string);
                    ifc_action.DefaultText = "->IFC";
                    ifc_action.UseDefaultText = true;
                    ifc_action.FieldName = "btn_ifc_action";
                    this.grd_db_imported_table.Columns.Add(ifc_action);


Maria
Telerik team
 answered on 10 Oct 2022
1 answer
526 views

Hello,

Is there any prop or name to set remove a grid border?

As of now I am using grid component from kendo react and it looks like a iframe in my website. So, I want to remove grid border so that it looks like on the page!

 

Vessy
Telerik team
 answered on 10 Oct 2022
1 answer
185 views

Hi there!

I'm programming in an old language so most of these events are a little buggy. Any formatting event throws by far the most bugs so I managed to go around them and make the programs work. However right now i need to change a column header color without using those events. I found in this site a way to change the cell color by using

THIS-OBJECT:gridCabecalhos:Rows[currentRowIndex]:Cells[currentColumnIndex]:Style:BackColor     = THIS-OBJECT:currentColor

Is there a way to do the same to the column headers?

 

JP

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Oct 2022
1 answer
215 views

There is an application I wrote many years ago that queries Active Directory and allows a searchable directory for our users.

Now that I have the Telerik Libraries I'm considering whether converting to a GridView with a SearchRow might be a suitable replacement.

In the previous version of the application I would type in part of the users name and it would only show the users with a match.

In the Telerik Gridview using a Searchrow it finds the same users, and more, but doesn't filter the users.  I would like it to only display the users where there is a match.

Also is there a way to customize the look of the search row? I would like to remove the entries highlighted on the right side as they aren't necessary.  I would also like the search row box to extend all the width of the form.

Maria
Telerik team
 answered on 06 Oct 2022
0 answers
128 views

Changed font and height of navigation bar.

However, you cannot change the size and location of the Previous/next button. What should I do?

HyenBae
Top achievements
Rank 1
 updated question on 06 Oct 2022
1 answer
619 views

Hello,

In Microsoft Controls, you have a Web Browser.

In Télrik, that is a solution ? becaus i don't want use a Microssoft Controls

Thank's

Laurent

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Oct 2022
4 answers
129 views

I need AutoComplete functionality for RadTextBoxControl that will allow me to identify the object selected by the user.


Public Class Person
    Public Property GuidPerson As Guid
    Public Property FirstName As String
    Public Property LastName As String
    Public ReadOnly Property FullName As String
        Get
            Return String.Format("{0} {1}", FirstName, LastName)
        End Get
    End Property
    Public Sub New(fName As String, lname As String)
        GuidPerson = Guid.NewGuid
        FirstName = fName
        LastName = lname
    End Sub
End Class

Public Class RadForm4
    Private listPerson As New List(Of Person)
    Public Sub New()
        InitializeComponent()

        listPerson.Add(New Person("John", "Snow"))
        listPerson.Add(New Person("Arya", "Stark"))
        listPerson.Add(New Person("Brandon", "Stark"))
        listPerson.Add(New Person("Catelyn", "Stark"))

        RadTextBoxControl1.AutoCompleteMode = AutoCompleteMode.Suggest
        RadTextBoxControl1.AutoCompleteDataSource = listPerson
        RadTextBoxControl1.AutoCompleteDisplayMember = "FullName"

    End Sub
    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        'HOW TAKE 'GuidPerson' from selected item in RadTextBoxControl1
    End Sub
End Class

How to capture a user-selected object?

For example, in RadDropDownList I would do it like this:

Dim searchValue As Person = TryCast(RadDropDownList1.SelectedItem.DataBoundItem, Person)

I don't want to use RadAutoCompleteBox because I want to display the results text and not tokens

Regards

Jack


 

 

Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 05 Oct 2022
1 answer
107 views

Hello,

i'm trying to use the scheduler as a planner. 

I've got a EF Model

Shifts

    public partial class Shifts
    {
        public int empId { get; set; }
        public int Id { get; set; }
        public int day { get; set; }
        public System.DateTime start { get; set; }
        public System.DateTime end { get; set; }
        public int location { get; set; }
    
        public virtual employee employee { get; set; }
    }

Locations

    public partial class location
    {
        public location()
        {
            this.Shifts = new HashSet<Shifts>();
        }
    
        public int Id { get; set; }
        public string name { get; set; }
   
        public virtual ICollection<Shifts> Shifts { get; set; }

    }

Employee


public partial class employee
    {
        public employee()
        {
            this.aktiveSchichten = new HashSet<Shifts>();
        }
    
        public int Id { get; set; }
        public string firstName { get; set; }
        public string lastName { get; set; }

        public virtual ICollection<aktiveSchichten> aktiveSchichten { get; set; }
    }

How do i add start and end for single schedulers by day - possibly integer 0-6? I'm trying to display weekly timeprofiles to load/save

 var mitarbeiter = db.employee;
            var schichten = db.Shifts.Where(a => a.location == (int)radMultiColumnComboBox2.SelectedValue);
            foreach (var schicht in schichten)
            {
                radScheduler1.Appointments.BeginUpdate();
                int count = 1;
                foreach (var ma in mitarbeiter)
                {
                    this.radScheduler1.Resources.Add(new Resource(count++, ma.firstName + ma.lastName));
                }
                DateTime start = ?;
                DateTime end = ?;
                Appointment appointment1 = new Appointment(start, end, schicht.employee.firstName + schicht.employee.firstName, "test");
                appointment1.BackgroundId = (int)AppointmentBackground.Anniversary;
                appointment1.StatusId = (int)AppointmentStatus.Unavailable;
                radScheduler1.Appointments.Add(appointment1);
                radScheduler1.Appointments.EndUpdate();
           }


 

Maria
Telerik team
 answered on 05 Oct 2022
1 answer
145 views

Using available examples, applying different formatting to row header does not work as the RowElement never comes in as a GridTableHeaderRowElement. New rows are formatting correctly.

 

 private void RadGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
        {
            try
            {
                if ((string)e.RowElement.RowInfo.Tag == "new row")
                {
                    e.RowElement.DrawFill = true;
                    e.RowElement.BackColor = System.Drawing.Color.LightCyan;
                    e.RowElement.ForeColor = System.Drawing.Color.Black;
                    e.RowElement.Text = "New";
                    e.RowElement.TextAlignment = System.Drawing.ContentAlignment.TopLeft;
                }
                else if (e.RowElement is GridTableHeaderRowElement)
                {
                    e.RowElement.DrawFill = true;
                    e.RowElement.BackColor = System.Drawing.Color.Navy;
                    e.RowElement.NumberOfColors = 1;
                    e.RowElement.ForeColor = System.Drawing.Color.White;
                    e.RowElement.Text = "";
                }
                else
                {
                    e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local);
                    e.RowElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
                    e.RowElement.ResetValue(LightVisualElement.NumberOfColorsProperty, Telerik.WinControls.ValueResetFlags.Local);
                    e.RowElement.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local);
                    e.RowElement.Text = "";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Uncaught error in {System.Reflection.MethodBase.GetCurrentMethod().Name}: {ex.Message}");
            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Oct 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
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
AI Coding Assistant
+? 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?