Telerik Forums
UI for WinForms Forum
3 answers
202 views
Hello,

I have a grid with a status column in which I want to place a red o green ball depending the bound value. I've tried to do that with the next code:


Private Sub Grid_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) _
        Handles gridPedidos.CellFormatting, _
                gridChrono.CellFormatting, _
                gridCentros.CellFormatting, _
                gridIncidencias.CellFormatting, _
                gridIncidenciasPFR.CellFormatting, _
                gridPedidosWeb.CellFormatting
    e.CellElement.Image = Nothing
    Dim column As GridViewCommandColumn = TryCast(e.CellElement.ColumnInfo, GridViewCommandColumn)
    If column IsNot Nothing Then
        Select Case column.UniqueName
            Case "Txt"
                CType(e.CellElement.Children(0), RadButtonElement).Image = My.Resources.document_text
                CType(e.CellElement.Children(0), RadButtonElement).ImageAlignment = ImageLayout.Center
            Case "Datos"
                CType(e.CellElement.Children(0), RadButtonElement).Image = My.Resources.table_view
                CType(e.CellElement.Children(0), RadButtonElement).ImageAlignment = ImageLayout.Center
        End Select
    End If
    If e.CellElement.ColumnInfo.Name = "Status" AndAlso TypeOf e.CellElement.RowInfo Is GridViewDataRowInfo Then
        Dim Status As Integer = CInt(e.CellElement.RowInfo.Cells("Status").Value)
        If Status = 0 Then
            e.CellElement.Image = My.Resources.button_green
        Else
            e.CellElement.Image = My.Resources.button_red
        End If
        e.CellElement.Text = ""
    End If
End Sub

Executing the program the status column is draw right as you can see in the image1 attached. But scrolling horizontally right and left, the red and green balls are showed in other columns (image2)

Thanks in advance
Blas

Jack
Telerik team
 answered on 23 Aug 2010
1 answer
133 views
I am using Visual Studio 2008 with the latest Telerik Winforms. If, for example, I drag a RadTextBox from the toolbox, and click "Edit UI Elements". Then, I choose FillPrimitive and attempt to set SmoothingMode to something like, say, "Invalid" (among other options)

Then immediately Visual Studio would say RadTextBox has thrown an exception in the designer and has been disabled. Error message is "Parameter is not valid" and no stack trace is available. The "element hierarchy editor " dialog is closed and VS hangs with 100% CPU usage (I have to terminate devenv.exe task to recover).

I know this is not a valid use case but should this be handled more gracefully? The exception dialog is OK but at least VS should not hang.
Peter
Telerik team
 answered on 23 Aug 2010
1 answer
115 views
I am trying to change the filter element behavior of a ComboBoxColumn. I would like the ComboBoxColumn filter element to behave identical to the filter element for a TextBoxColumn. I need the filtering to be textbased instead of a drop down and I need the DisplayElement to be filtered as opposed to filtering the ValueMember. Is this possible?
Martin Vasilev
Telerik team
 answered on 23 Aug 2010
3 answers
144 views
When we have the scheduler set to show the Timeline view, the AppointmentSelected and AppointmentSelecting events are not firing.  Anyone have a solution to this?

Thanks!
Matthew Link
Top achievements
Rank 1
 answered on 20 Aug 2010
3 answers
207 views
hi,
I recently upgraded to 2010 Q2 and since then I get an error: 'Object Reference not set to an instance of an object' on this line:

e.RowElement.BackColor =

CType(_colourConvert.ConvertFromString(e.RowElement.RowInfo.Cells(_StatusColour).Value().ToString), System.Drawing.Color)

 


Any help would b appreciated.
Hilda Kenny
Top achievements
Rank 1
 answered on 20 Aug 2010
1 answer
142 views
Hello,

I have added a radcomboitem as like -----------
If i select that item value it should not get selected and have to function like separator.
I have set that item shape as customshape1, which doesnt allow user to select -------------
but am able to select it using keyboard arrow keys, how to restrict that?

Thank you
Jayanthi
Peter
Telerik team
 answered on 20 Aug 2010
1 answer
229 views
Hi,

When I open the drowpdown of a multicolumnbox and use the scrollbar to reach lower items, the scroll speed is fast. However, when I use the scroll wheel on the mouse, the scroll speed is very slow. Is there anything I can do to speed up the mouse wheel scroll speed?

Regards,
Conrad
Stefan
Telerik team
 answered on 20 Aug 2010
3 answers
240 views

Hi,

I have a really strange situation. I have a form that has a radpanel control and all my others controls are on the panel. If I put a RadLabel on the right bottom and if I set the anchor of the label to bottom-right, the location of the label is change.

Here is my setting :

 

 

 

 

Me.RadPanel1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _

 

 

Or System.Windows.Forms.AnchorStyles.Left) _

 

 

Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)

 

 

Me.RadPanel1.Controls.Add(Me.RadLabel1)

 

 

Me.RadPanel1.Location = New System.Drawing.Point(603, 385)

 

 

Me.RadPanel1.Name = "RadPanel1"

 

 

 

 

 

Me.RadPanel1.Size = New System.Drawing.Size(200, 100)

 

 

Me.RadPanel1.TabIndex = 14

 

 

Me.RadPanel1.Text = "RadPanel1"

 

 

 

Me

 

.RadLabel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)

 

 

Me.RadLabel1.Location = New System.Drawing.Point(138, 83)

 

 

Me.RadLabel1.Name = "RadLabel1"

 

 

Me.RadLabel1.Size = New System.Drawing.Size(59, 14)

 

 

Me.RadLabel1.TabIndex = 0

 

 

Me.RadLabel1.Text = "RadLabel1"

 


At runtime in immediate windows, i get:

?me.RadLabel1.Location

{X = 77 Y = 67}

Empty: {X = 0 Y = 0}

IsEmpty: False

X: 77

Y: 67


Any idea of what's going wrong?
Stefan
Telerik team
 answered on 20 Aug 2010
1 answer
143 views
Hi,

I have several problem when trying to develop app by RadDock control.

1. I use method "SaveToXml"  by saving as Strem or TextWritter format, but it does not work, could you give me a simple example? In my App, I want to save as System.IO.Stream and then save in memory.
Dim stream as System.IO.Stream
  
RadDock1.SaveToXml(stream)

2. Is there any property I can set to restrict the ToolWindow and do not let it be dragging outside the RadDock?

3. Can I disable the center image of DockingGuideTemplate to restrict the ToolWindow became TabbedDocument, like this http://www.telerik.com/help/silverlight/raddocking-features-compass.html
Stefan
Telerik team
 answered on 20 Aug 2010
1 answer
105 views

In Q2 2010 SP1,  we use following codes to implment appointments using recurrencerule.  But the appointment time in recurring appointments do not show correctly ( see attached screen shot).  This happens to all recurrence rules ( monthly, weekly and daily)

==========================================================================================

 

radScheduler1.Appointments.Clear();

 

Appointment ap = new Appointment();

 

 

DailyRecurrenceRule drule = new DailyRecurrenceRule();

 

drule.Start =

DateTime.Today;

 

drule.End =

DateTime.Today.AddYears(2);

 

ap.Start =

new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 9, 0, 0);

 

ap.End =

new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 11, 0, 0);

 

ap.RecurrenceRule = drule;

radScheduler1.Appointments.Add(ap);

 

=================================================================

There is not problem , using the same codes in earlier versions such as Q2 2009

======================================================================

Dobry Zranchev
Telerik team
 answered on 20 Aug 2010
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
StatusStrip
CheckedListBox
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?