Telerik Forums
UI for WinForms Forum
1 answer
103 views

I've got a RadSplitButton setup on a ribbon.  Initially when clicking I'd always get the dropdown menu regardless of where I was clicking.  Then I read you have to set the DefaultItem property which I did like this:

 

btnTest.DefaultItem = btnTest.ActionButton

 

This works great...except now the UI stops updating the button when the mouse is clicked.  The entire button turns white when you mouse over and remains white as you click (on either the Action Button or the Arrow Button)

BTW I'm using VisualStudio2012LightTheme.

 

Can you explain how to correct this?

Thank you!

Dimitar
Telerik team
 answered on 18 Oct 2018
1 answer
178 views

I have used this code to generate barcode to excel.   I tried Code 39 and EAN128.  But the barcode scanner cannot read.  What is missing in here?  Where can I find demo & documentation for winform barcode to excel?  Thanks.

                Telerik.WinControls.UI.Barcode.Symbology.EAN128 code39Extended1 = new Telerik.WinControls.UI.Barcode.Symbology.EAN128();
                RadBarcode rBL = new RadBarcode();
                rBL.Symbology = code39Extended1;
                rBL.Value = "EE4698";
                rBL.LoadElementTree();
                Image imgBL = rBL.ExportToImage();
                imgBL.Save("c:\\temp\\img.jpg");

                oSheet.Cells[1, 1] = "EE4698";
                oSheet.Shapes.AddPicture("c:\\temp\\img.jpg", MsoTriState.msoFalse, MsoTriState.msoCTrue, 50, 50, 300, 45);

Hristo
Telerik team
 answered on 18 Oct 2018
3 answers
213 views

I've been dealing with this UI hiccup for a while now and just cant get my head around how to fix it.

I've got a RadRibbonForm with a RadRibbonBar on it (of course)

The theme is VisualStudio2012LightTheme

There's a RadDropDownButtonElement in one of the groups.

I made the surrounding area darker to bring out the contrast in my images.

 

Here's the problem:

When you look at the enabled button with no action - it looks perfect.  You can see this in image_1

When you mouse over though - you can see a little nibblet of pixels above the arrow-button portion - this is image_2

When you mouse down on the arrow the UI bug becomes very noticeable - this is image 3

 

Any thoughts on how to correct this?

Kindest regards,

Curtis

 

 

 

Dimitar
Telerik team
 answered on 18 Oct 2018
0 answers
95 views

Hello,

I've gone through the tutorial here: https://docs.telerik.com/devtools/winforms/scheduler/appointments-and-dialogs/adding-a-custom-field-to-the-editappointment-dialog

I have been able to add my custom field to the scheduler, however, when I save the appointment and edit the same appointment again, the value I put in the "IdPaciente" field is not recovered, it simply recovers the empty value.
But if you are saving in the database the field "IdPaciente"
I'm seeing that in the LoadSettingsFromEvent method, IEvent the custom field retrieves empty. 
What am I doing wrong, could you help me please?

 public partial class CustomAppointmentEditForm: Telerik.WinControls.UI.Scheduler.Dialogs.EditAppointmentDialog
    {
        public CustomAppointmentEditForm()
        {
            InitializeComponent();
        }

        protected override void LoadSettingsFromEvent(IEvent ev)
        {
            base.LoadSettingsFromEvent(ev);
            AppointmentWithIdPaciente appointmentWithIdPaciente = ev as AppointmentWithIdPaciente;

            if(appointmentWithIdPaciente != null)
            {
                radTextBoxIdPaciente.Text = appointmentWithIdPaciente.IdPaciente;
            }
        }

        protected override void ApplySettingsToEvent(IEvent ev)
        {
            AppointmentWithIdPaciente appointmentWithIdPaciente = ev as AppointmentWithIdPaciente;
            if(appointmentWithIdPaciente != null)
            {
                appointmentWithIdPaciente.IdPaciente = radTextBoxIdPaciente.Text;
            }
            base.ApplySettingsToEvent(ev);
        }
        protected override IEvent CreateNewEvent()
        {
            return new AppointmentWithIdPaciente();
        }
    }
}


    public class AppointmentWithIdPaciente : Appointment
    {
        public AppointmentWithIdPaciente() : base()
        {
        }

        protected override Event CreateOccurrenceInstance()
        {
            return new AppointmentWithIdPaciente();
        }

        string _IdPaciente = string.Empty;

        public string IdPaciente
        {
            get 
            { 
                return this._IdPaciente; 
            }
            set 
            {
                if (this._IdPaciente != value)
                {
                    this._IdPaciente = value;
                    OnPropertyChanged("IdPaciente");
                }
            }
        }
    }
}


    public class AppointmentWithIdPacienteFactory : IAppointmentFactory
    {
        public IEvent CreateNewAppointment()
        {
            return new AppointmentWithIdPaciente();
        }
    }


 public partial class radForm1 : Telerik.WinControls.UI.RadForm
    {
        public radForm1()
        {
            InitializeComponent();

         
            this.radScheduler1.AppointmentFactory = new AppointmentWithIdPacienteFactory();
            SchedulerBindingDataSource dataSource = this.schedulerBindingDataSource1;
            dataSource.EventProvider.AppointmentFactory = this.radScheduler1.AppointmentFactory;

            AppointmentMappingInfo appointmentMappingInfo = (AppointmentMappingInfo)dataSource.EventProvider.Mapping;
            appointmentMappingInfo.Mappings.Add(new SchedulerMapping("IdPaciente", "IdPaciente"));

            schedulerBindingDataSource1.EventProvider.DataSource = this.testDataSet.Appointments;
            this.radScheduler1.DataSource = dataSource;
            schedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo;
           
            AppointmentsTableAdapter appointmentsTableAdapter = new AppointmentsTableAdapter();
            appointmentsTableAdapter.Fill(testDataSet.Appointments);

            ResourcesTableAdapter resourcesTableAdapter = new ResourcesTableAdapter();
            resourcesTableAdapter.Fill(testDataSet.Empleados);

            AppointmentsResourcesTableAdapter appointmentsResourcesTableAdapter = new AppointmentsResourcesTableAdapter();
            appointmentsResourcesTableAdapter.Fill(testDataSet.AppointmentsResources);

            radScheduler1.GroupType = GroupType.Resource;
             
            this.schedulerBindingDataSource1.Rebind();
        }


 CustomAppointmentEditForm appointmentDialog = null;
        private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
        {
            if(this.appointmentDialog == null)
            {
                this.appointmentDialog = new CustomAppointmentEditForm();
            }
            e.AppointmentEditDialog = this.appointmentDialog;
        }
   private void radButtonSave_Click(object sender, EventArgs e)
        {
            AppointmentsTableAdapter appointmentsTableAdapter = new AppointmentsTableAdapter();
            AppointmentsResourcesTableAdapter appointmentsResourcesTableAdapter = new AppointmentsResourcesTableAdapter();

            TestDataSet.AppointmentsResourcesDataTable deletedChildRecords = 
                this.testDataSet.AppointmentsResources.GetChanges(DataRowState.Deleted)
                as TestDataSet.AppointmentsResourcesDataTable;

            TestDataSet.AppointmentsResourcesDataTable newChildRecords =
              this.testDataSet.AppointmentsResources.GetChanges(DataRowState.Added)
              as TestDataSet.AppointmentsResourcesDataTable;

            TestDataSet.AppointmentsResourcesDataTable modifiedChildRecords =
            this.testDataSet.AppointmentsResources.GetChanges(DataRowState.Modified)
            as TestDataSet.AppointmentsResourcesDataTable;

            try
            {
                if (deletedChildRecords != null)
                {
                    appointmentsResourcesTableAdapter.Update(deletedChildRecords);
                }
                appointmentsTableAdapter.Update(this.testDataSet.Appointments);

                if (newChildRecords != null)
                {
                    appointmentsResourcesTableAdapter.Update(newChildRecords);
                }

                if(modifiedChildRecords != null)
                {
                    appointmentsResourcesTableAdapter.Update(modifiedChildRecords);
                }

                this.testDataSet.AcceptChanges();
                
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                if (deletedChildRecords != null)
                    deletedChildRecords.Dispose();

                if (newChildRecords != null)
                    newChildRecords.Dispose();

                if (modifiedChildRecords != null)
                    modifiedChildRecords.Dispose();

            }
        }

Emmanuel
Top achievements
Rank 1
 asked on 17 Oct 2018
8 answers
971 views
is there an event on a rad grid when the user clicks the "click here to add a new row"?  i can't find one.  I need to have that row visible and clickable, but i don't want it to really add one in the grid.  I want to do a pop up window to add the row and then when that window gets done, i'll manually add it to the dataset behind the grid.  i had another post where someone answered my question with doing custom user controls in the grid to edit data.  that worked great for most of my stuff, but now i have a situation where there are 3 columns in the grid, but the edit form needs to show about 60, so i want to do a popup winform and add a new one that way.  The rest of the grid will be non editable so it's just new rows.

Thanks!
DBE
Top achievements
Rank 1
 answered on 17 Oct 2018
15 answers
1.0K+ views
 How can I get the combo in the grid to allow the users to at least type the first letter of whatever selection they need to make? At the momemnt I've got a working combo, it just doesn't allow any typing at all - is there a property I need to set?

Dimitar
Telerik team
 answered on 17 Oct 2018
1 answer
145 views

Hi,

 

Im trying to customize a ShapeForm, but I dont see on the VisualStyleBuilder.

 Is there ShapeForm on VisualStyleBuilder?

 

Thank you!

Dimitar
Telerik team
 answered on 17 Oct 2018
3 answers
131 views

How's one do this?

I tried a function that looped thru the cols and did the following;

//objTheGrid.Columns[intIDX].Width = 1000;

objTheGrid.MasterTemplate.Columns[intIDX].Width = 1000

Neither worked.

Also did a similar thing for Rows, but for height, and that didn't do anything either.

 

THanks

 

 

Dimitar
Telerik team
 answered on 17 Oct 2018
3 answers
78 views

Hello,

As I can load the default drop-down list by default, I try it but it does not work in the load or the constructor event, but it works in the button that I put in test.


     It does not work
     public radFormAppointmentsEdit ()
         {
             InitializeComponent ();
             cmbShowTimeAs.SelectedValue = 3;
         }


    
     It does not work
     private void radFormAppointmentsEdit_Load (object sender, EventArgs e)
         {
             cmbShowTimeAs.SelectedValue = 3;
         }


        It works
         private void radButtonTest_Click (object sender, EventArgs e)
         {
             cmbShowTimeAs.SelectedValue = 3;
         }


I just want it to work for me when I start the form, what can I do?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Oct 2018
2 answers
81 views

Hello,

I need to set the background color of each row.

I have a function that exports a grids rows to excel document.

I need to remove any colours on the grids rows to be no colors.

Hows this done exactly? I see from reading the forums that I somehow must use the rowformatting event.

Need to know how I would call that and loop thru the rows to clear the background color.

 

Thanks in advance.

 

Dimitar
Telerik team
 answered on 16 Oct 2018
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?