Telerik Forums
UI for WinForms Forum
2 answers
457 views
Goal: I need be able to set the font size of a grid's cells at runtime based on user input.
Design: I have a user control with a telerik RadGrid on it.  The grid has a mixture of datacolumns and imagecolumns.  The user control exposes a property called FontSize.
Problem: I can't get Grid_CellFormatting to be hit once the FontSize Property is changed.  

I need some way to force the grid to reformat all the cells when the FontSize Property is set.
I can mouse over the cells which causes Grid_CellFormatting to fire, at which time the cell font is updated with the new font size, but i need this to happen programatically.

My User Control:

  Private Sub Grid_CellFormatting(ByVal sender As Object, _ 
        ByVal e As CellFormattingEventArgs) _ 
        Handles grid.CellFormatting 
        Dim f As New System.Drawing.Font("Arial", My.Settings.Grid_FontSize, _ 
            System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 
        e.CellElement.Font = f 
    End Sub 


    Public Property FontSize() As Single Implements IReportGridView.FontSize 
        Get 
            Return My.Settings.Grid_FontSize 
        End Get 
        Set(ByVal value As Single
            My.Settings.Grid_FontSize = value 
            My.Settings.Save() 
            My.Settings.Reload() 
        End Set 
    End Property 


I've tried adding me.grid.Update, Me.grid.Refresh after the My.settings.reload, but nothing seemed to trigger the CellFormatting event.

Your help is appreciated.

Thanks.
Matt
Top achievements
Rank 1
 answered on 04 Sep 2009
1 answer
188 views
hello

when I try to copy an existing user control from one form to another, I get the following error:
"an error occurred while processing this command. the 'openaccess' section cannot be found in the application's configuration file"

when I try to add a new user control to a new form I get the following error:
Failed to create component 'AddEquipmentUC'. The error message follows:
'Telerik.OpenAcccess.Exceptions.ConfigurationException: The 'openaccess' section cannot be found in the application's configuration file. at Telerik.OpenAccess.Config.XML.ConfigFileReader.GetOpenAccessNode(Boolean fromAppConfig, String configFileName, XmlTextReader & xmlTextReader, Boolean throwException)................etc


I am using TortoiseSVN for source control. Everything works fine except for this. I suspect Tortoise is keeping it from authenticating the user/password specified in the openaccess element in the app.config section.

any ideas why this is occurring and how I can fix this? this is really not good for development schedules and I really hope there is a fix for this OTHER than removing source control.


Zoran
Telerik team
 answered on 04 Sep 2009
7 answers
165 views

Hi

I am using an example you provided in a previous reply to implement drag and drop from a radgridview. When using the mouse down event to pass row information into an array if the row being dragged is being edited the application crashes completely. How do I handle this (test for the row edit state) to prevent the crash?

Regards

Joe

Private Sub RadGridView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles SubContractgrd.MouseDown

        Try

                downpoint = e.Location

                rowtodrag = GetRowAtPoint(Me.SubContractgrd, e.Location)

                ContArray(0, 0) = (rowtodrag.Cells(0).Value)

                ContArray(0, 1) = (rowtodrag.Cells(1).Value)

                ContArray(0, 2) = (rowtodrag.Cells(2).Value)

                If Not IsNothing(rowtodrag.Cells("Text").Value) Then

                    ContArray(0, 2) = Replace(StrConv(rowtodrag.Cells("Text").Value, VbStrConv.Uppercase), " ", "")

                Else

                    ContArray(0, 2) = (rowtodrag.Cells(1).Value)

                End If

 

                If Not IsNothing(rowtodrag.Cells("D").Value) Then

                    ContArray(0, 3) = "SD"

                End If

                If Not IsNothing(rowtodrag.Cells("V").Value) Then

                    If Not IsNothing(ContArray(0, 3)) Then

                        ContArray(0, 3) = "SDV"

                    Else

                        ContArray(0, 3) = "SD"

                        End

                    End If

                End If

            End If

        Catch ex As Exception

            If Err.Number = 91 Then

                Err.Clear()

                Exit Sub

            Else

                MsgBox(Err.Description & Err.Number)

            End If

 

        End Try

    End Sub

Jack
Telerik team
 answered on 04 Sep 2009
2 answers
131 views
I have a STATUSSTRIP placed on a form called DESKTOP, which is always ON TOP and present.  This form calls and runs everything in my VB.NET application, and happens to be the STARTUP form.  I call an PROC which is one of my MODULES instead of CLASS.  This PROC happens to run for a long time.  I would like for the PROC to post an update to the STATUSSTRIP located on my DESKTOP form (calling form) using the STATUSSTRIPLABEL.VALUE1 and STATUSSTRIPLABEL.TEXT properties.  How would I accomplish this?

I tried using DESKTOP.STATUSSTRIP.TEXT = "Something..." and it would not work from my SUB.  Basically, my code would look like this on the FORM side.

PRIVATE SUB DESKTOP_ONLOAD() HANDLES FORM_LOAD

    ....
    Call gsDoSomething
    ...
    
    ME.STATUSSTRIPLABEL.TEXT = "Ready..."
    
END SUB

The PROC being called will live in a MODULESOMETHING.VB file in my project and its code will resemble...

PUBLIC SUB gsDoSomething()

    ....
    DESKTOP.STATUSSTRIPLABEL.TEXT = "Doing something..."
    ...

END SUB

Any help or suggestion would be greatly appreciated.
sayyed mahdi khadishi
Top achievements
Rank 2
 answered on 04 Sep 2009
3 answers
142 views
I crated custom radcombobox in EditAppointmentDialog. I don't know how to change color of Scheduler's cell when I select custom radcombobox?

How I change background color which display on appointment schedule? help me please.

Thank you,
Pum+
Boyko Markov
Telerik team
 answered on 04 Sep 2009
1 answer
87 views
Hello
   Help me please!!! I need to add value and change color of AppointmentStatus and AppointmentBackgroundInfo.
   I don't know how to do.
    
           The following method, I need to add value and change color!!!
           protected virtual void FillDefaultBackgrounds(SchedulerBackgroundCollection backgrounds)
           protected virtual void FillDefaultStatuses(SchedulerStatusCollection statuses)

Pum+
Boyko Markov
Telerik team
 answered on 04 Sep 2009
3 answers
156 views
On the calendar with multi-select disabled...

when i click on a date, the selected date is set to the date i selected but when i unselect, rather than go back to today's date, it is set to
1/1/1980.

I have changed this in code so that on click, if the date it 1/1/1980 it sets it to today's date.

on load i even change the focused and selected dates to today but i still see 1/1/1980 register when i unselect a date.

Can someone explain this behavior?
Boyko Markov
Telerik team
 answered on 04 Sep 2009
4 answers
91 views
I'm trying out the scheduler component, and I will need to default to having appointments as multiples of 30 minutes.

The way I think I should be doing this is
SchedulerDayView view = radScheduler1.GetDayView(); 
view.RangeFactor = ScaleRange.HalfHour; 

But when I do that, and then try to create appointments, the start and finish time boxes are greyed out and the appointments always end up being all day appointments.

I am using a custom Appointment type and custom EditAppointmentDialog, but everything is working fine for me until I set the RangeFactor.

I'm using 2009 Q2 SP1.

Can anyone give me any hints as to why this would not work?

Thanks,

Marcus.
Boyko Markov
Telerik team
 answered on 04 Sep 2009
10 answers
232 views

excuse the typo in the topic title ...

2009 Q2
When I simply change a Form to inherit from RadForm instead of standard WinForm Form, a lot of things don't work as expected anymore. For example Saving and Restoring Windows Position etc. does not work identically.

Also I have a problems with RadForms that were created with earlier Versions of the Controls. Here, anchored Buttons suddenly do not appear at the right place at runtime. I guess it has something to do with the non-client area drawing / sizing as the child controls seem so be moved upwards about the height of the window title bar.
These issues I cannot reproduce with sample code as it would mean setting up a development machine with older versions.
Deyan
Telerik team
 answered on 04 Sep 2009
4 answers
74 views
Sorry, I drag a RibbonBar into a new form, but when I click the <add new tab>, guess what !  It just show the <add new tab> again, but """no new tab"""" were added; in addition, all buttons on the ribbonbar that within this control have the same problem....... please advise, tks.

Edwin
Chia Ming Liu
Top achievements
Rank 1
 answered on 04 Sep 2009
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?