Telerik Forums
UI for WinForms Forum
12 answers
185 views
Hi,

Is there an event that is exposed that can be used to capture the user double-clicking on the StartButtonImage on the RibbonBar?

I would like for my application to close when the image is double-clicked.

Thanks,

neil
Marco
Top achievements
Rank 1
 answered on 26 Sep 2013
4 answers
122 views
Do you guys have an example on how I would remember the whether the user selected or deselected the “Show description” and “Show toolbar” settings in the property grid context menu? I tried casting the items as a PropetyGridMenuItem in the RadContextMenu_DropDownClosed event, but IsChecked is always set to true. Here is the code:

PropertyGridMenuItem descriptionItem = radPropertyGrid.RadContextMenu.Items[6] as PropertyGridMenuItem;
if (descriptionItem != null && !descriptionItem.IsChecked)
        File.Create(System.IO.Path.Combine(path, "PropertyGridDescriptionUnchecked.txt"));
Paul
Top achievements
Rank 1
 answered on 25 Sep 2013
3 answers
267 views
Dear Forum readers,

I am new to Telerik's Winforms controls and must first say that I am impressed with them. The music library demo especially inspired me because of its "cover flow" look. I decided to give it a spin ;-) and try to implement this in one of our products.
So I chose to use a Bezier path as in the example and started adding items... (paintings in my case).
The problem that I encountered is that I have a variable number of images that are attached to a database record. The number of images gan be anything from 1... n What I want to achieve is that the selected image is always in the centre (middle) position. This works great for an odd number of items, but not for an even number of items. In the case of an even numberof items there are two images at the centre sitting side by side. The situation even becomes weirder when the number of items falls below 3:
If there are only two items then each of them sits at the end of the Bezier path, with nothing in the middle, when there is only a single item then this is placed at the end of the Bezier path and the animation becomes weird too: it "flashes" twice on display (not what you want).

This is the arrangement that i would expect:

5 items

5            1
    4     3
       2

4 items:

4
    3     1
        2

3 items:

3       1
    2

2 items:

2
     1

1 item:

       1

I have created a small Visual studio 2010 project that illustrates my problem. Yoiu can download it at : ftp://ftp.adlibsoft.com/pub/outgoing/carouseltest.zip Does anyone know how I can achieve what I want with the radCarousel ? I tried different Bezier paths for 2 or 1 items. Tha "kind of" works, but I am still stuck with the double animation when there is only a single item. Turning the animation off helps, but that is also not what one wants.

Thanks in advance for any suggestions

Bert Degenhart Drenth
Adlib Information Systems
bdd@adlibsoft.com
www.adlibsoft.com

George
Telerik team
 answered on 25 Sep 2013
1 answer
226 views
I want to create a custom control (C#) inherited from RadListControl so that my new control will have a click event for the list's items (not the control itself - since, undesirably, the scroll bar triggers the control's event).

Which control event can I override so I can subscribe to the item's double-click event?  I expected an item_added or similar event but don't see one.

I can do this (but it is ugly and doesn't handle new items being added later):
foreach (RadListDataItem item in this.RadListControl1.Items) {
    item.VisualItem.DoubleClick += Item_DoubleClick;
}

private void Item_DoubleClick(object sender, EventArgs e)
{
    RadListDataItem item = ((RadListVisualItem)sender).Data;
    MessageBox.Show(item.Text.ToString());
}
Dimitar
Telerik team
 answered on 25 Sep 2013
1 answer
92 views
I was a bit frustrated with the collapsing feature that hides the text of the buttons when the window is not wide enough, because only the buttons are affected, not the dropdownbuttons and splitbuttons, leading to a weird looking result when they are mixed in a same group.

I found the following solution: derive from DropDownButton, and override CreateChildElements with
base.CreateChildElements();
CollapsableButtonAdapter adapter = new CollapsableButtonAdapter(ActionButton)
    { ShouldHandleMouseInput = false }; // otherwise, the adapter swallows the clicks
Children.Add(adapter);
Dimitar
Telerik team
 answered on 25 Sep 2013
15 answers
786 views

hi ,

I have a requirement where in I got to show two or more images inside a single grid column.  Pls advise how to achieve the same.

Pls find the attachment containing the sample image of the grid.

thanks
Krishnan N

Anton
Telerik team
 answered on 25 Sep 2013
1 answer
791 views
below is my code
 Private Sub GVCl_RowFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles GVClaimHistory.RowFormatting

        If InStr(e.RowElement.RowInfo.Cells(0).Value, "MyColumn") <> 0 Then
            e.RowElement.DrawFill = True
            e.RowElement.GradientStyle = GradientStyles.Solid
            e.RowElement.BackColor = Color.Navy
            e.RowElement.ForeColor = Color.Yellow
        End If
    End Sub

I would like to add font bold to this row how can i do it?

I tried     e.RowElement.Font.Bold = True
but it gives me Error    74    Property 'Bold' is 'ReadOnly'.  

Please help

Smayr
Top achievements
Rank 1
 answered on 25 Sep 2013
1 answer
189 views
Hi,

I am using a Datasource to populate the gridview. The databinding is done via the propertybuilder at the design time. The Grid works fine when the database connection is established. however when there is an error connecting the database an empty grid is shown and there is no error thrown out.  

Here is the high level data flow:
GridView <-> bindingDataSource <-> dataset (mapped to a database table) 

The dataset is generated automatically and mainly configured via XSD. The database access is done via Integrated Security (via windows authentication)

Where is the best place to handle database connection error (for example connection failure, user connection reject)?


.Net version 4.0
Windows Forms version 2013.2 724

Thanks
AMP
Stefan
Telerik team
 answered on 25 Sep 2013
1 answer
1.0K+ views

Hi,

Is there a method I can invoke that will cause all groups to expand/collapse? Right now i am just iterating through the group collection and doing it individually.

Thanks.
Ralitsa
Telerik team
 answered on 24 Sep 2013
9 answers
822 views
I have been having issues with what appear to be memory leaks when using Telerik WinControls. I first noticed the issue in a form that we have that has dozens of controls on it, and which increases the memory usage by upwards of 40 MB when shown. However, I then made a new project, simply dragged a few controls onto the form, and I am seeing the exact same issue, just on a smaller scale. When the application first starts, memory usage is around 18 MB, but by the time it is done, usage is around 40 MB. The code that I am running the test with is:

Public Class Main
    Shared Sub Main()
        MessageBox.Show("Start")

        For i = 0 To 50 Step 1
            Dim f As New Form1
            f.Show()
            Threading.Thread.Sleep(100)
            f.Close()
            f.Dispose()
        Next

        GC.Collect()
        MessageBox.Show("Stop")
    End Sub
End Class

The controls that I used the designer to add to the form are:
    Friend WithEvents RadMenu1 As Telerik.WinControls.UI.RadMenu
    Friend WithEvents RadButton1 As Telerik.WinControls.UI.RadButton
    Friend WithEvents RadTextBox1 As Telerik.WinControls.UI.RadTextBox
    Friend WithEvents RadSplitButton1 As Telerik.WinControls.UI.RadSplitButton
    Friend WithEvents RadCarousel1 As Telerik.WinControls.UI.RadCarousel
    Friend WithEvents RadButton2 As Telerik.WinControls.UI.RadButton

What am I doing wrong? Using some memory profiling tools, it looks like there may be timers still running or other event handlers registered that are preventing the controls from being garbage collected.

Is there something special that needs to be done to clean up after the Telerik controls?

Due to the size of the form we are using in real life, this can quickly cause the application to be using 100's of MB's of memory, which has actually led to out-of-memory issues in some cases.

Thanks for your help!
Dimitar
Telerik team
 answered on 24 Sep 2013
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?