Telerik Forums
UI for WinForms Forum
3 answers
212 views
I spent 3 hours trying to figure this out, i am sure it is something silly, but no matter what i try i am still stuck


why the button is not deleting the item in the grid?!!!

see code:

Form1.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ 
Partial Class Form1 
    Inherits System.Windows.Forms.Form 
 
    'Form overrides dispose to clean up the component list. 
    <System.Diagnostics.DebuggerNonUserCode()> _ 
    Protected Overrides Sub Dispose(ByVal disposing As Boolean
        Try 
            If disposing AndAlso components IsNot Nothing Then 
                components.Dispose() 
            End If 
        Finally 
            MyBase.Dispose(disposing) 
        End Try 
    End Sub 
 
    'Required by the Windows Form Designer 
    Private components As System.ComponentModel.IContainer 
 
    'NOTE: The following procedure is required by the Windows Form Designer 
    'It can be modified using the Windows Form Designer.   
    'Do not modify it using the code editor. 
    <System.Diagnostics.DebuggerStepThrough()> _ 
    Private Sub InitializeComponent() 
        Me.RadGridView1 = New Telerik.WinControls.UI.RadGridView 
        Me.RadButton1 = New Telerik.WinControls.UI.RadButton 
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).BeginInit() 
        CType(Me.RadGridView1.MasterGridViewTemplate, System.ComponentModel.ISupportInitialize).BeginInit() 
        CType(Me.RadButton1, System.ComponentModel.ISupportInitialize).BeginInit() 
        Me.SuspendLayout() 
        ' 
        'RadGridView1 
        ' 
        Me.RadGridView1.Location = New System.Drawing.Point(0, 0) 
        Me.RadGridView1.Name = "RadGridView1" 
        Me.RadGridView1.Size = New System.Drawing.Size(240, 150) 
        Me.RadGridView1.TabIndex = 0 
        ' 
        'RadButton1 
        ' 
        Me.RadButton1.AllowShowFocusCues = True 
        Me.RadButton1.Location = New System.Drawing.Point(12, 213) 
        Me.RadButton1.Name = "RadButton1" 
        Me.RadButton1.Size = New System.Drawing.Size(75, 23) 
        Me.RadButton1.TabIndex = 1 
        Me.RadButton1.Text = "RadButton1" 
        ' 
        'Form1 
        ' 
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 
        Me.ClientSize = New System.Drawing.Size(284, 262) 
        Me.Controls.Add(Me.RadButton1) 
        Me.Controls.Add(Me.RadGridView1) 
        Me.Name = "Form1" 
        Me.Text = "Form1" 
        CType(Me.RadGridView1.MasterGridViewTemplate, System.ComponentModel.ISupportInitialize).EndInit() 
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).EndInit() 
        CType(Me.RadButton1, System.ComponentModel.ISupportInitialize).EndInit() 
        Me.ResumeLayout(False
        Me.PerformLayout() 
 
    End Sub 
    Friend WithEvents RadGridView1 As Telerik.WinControls.UI.RadGridView 
    Friend WithEvents RadButton1 As Telerik.WinControls.UI.RadButton 
End Class 
 


Form1.vb
Imports Telerik.WinControls 
Public Class Form1 
    Private ModuleName As String = "Form1" 
    Private list As New ArrayList() 
 
    Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load 
        AddColumns() 
        FillDevelopmentItem() 
    End Sub 
    Private Sub FillDevelopmentItem() 
 
        list.Add(New RGItem(1, False"Development Fees", 1, 0.75D)) 
        list.Add(New RGItem(2, True"15x18", 4, 5.75D)) 
        RadGridView1.DataSource = list 
    End Sub 
    Private Sub AddColumns() 
        Dim xCol As UI.GridViewDataColumn 
        With RadGridView1 
            .MasterGridViewTemplate.AllowAddNewRow = False 
            .DataSource = Nothing 
            .GridElement.BeginUpdate() 
 
            .MasterGridViewTemplate.Columns.Clear() 
            xCol = New UI.GridViewTextBoxColumn("ID""P_DP_Detail_ID"
            xCol.VisibleInColumnChooser = False 
            xCol.IsVisible = False 
            xCol.AllowSort = False 
            xCol.AllowResize = False 
            .MasterGridViewTemplate.Columns.Add(xCol) 
 
            'xCol = New UI.GridViewCommandColumn("Delete", "ShowDel") 
            xCol = New UI.GridViewDataColumn("Delete""ShowDel"
            xCol.VisibleInColumnChooser = False 
            xCol.IsVisible = True 
            xCol.AllowSort = False 
            xCol.AllowResize = False 
            .MasterGridViewTemplate.Columns.Add(xCol) 
 
            xCol = New UI.GridViewTextBoxColumn("Description""MeasureDescription"
            xCol.VisibleInColumnChooser = False 
            xCol.IsVisible = True 
            xCol.AllowSort = False 
            xCol.AllowResize = False 
            .MasterGridViewTemplate.Columns.Add(xCol) 
 
            xCol = New UI.GridViewDecimalColumn("Count""P_DP_Detail_Count"
            xCol.VisibleInColumnChooser = False 
            xCol.IsVisible = True 
            xCol.AllowSort = False 
            xCol.AllowResize = False 
            .MasterGridViewTemplate.Columns.Add(xCol) 
 
            xCol = New UI.GridViewDecimalColumn("Total""TotalAmount"
            xCol.VisibleInColumnChooser = False 
            xCol.IsVisible = True 
            xCol.AllowSort = False 
            xCol.AllowResize = False 
            .MasterGridViewTemplate.Columns.Add(xCol) 
 
            '.Columns(GridCols.enDesc).Width = 220 
            '.Columns(GridCols.enCount).Width = 150 
            '.Columns(GridCols.enTotal).Width = 150 
 
            .GridElement.EndUpdate() 
        End With 
      
    End Sub 
    Private Class RGItem 
        Private _P_DP_Detail_ID As Integer = 0 
        Private _ShowDel As Boolean = True 
        Private _MeasureDescription As String = String.Empty 
        Private _P_DP_Detail_Count As Integer = 1 
        Private _TotalAmount As Decimal = 0D 
        Private _Notes As String = String.Empty 
 
        Public Property P_DP_Detail_ID() As Integer 
            Get 
                Return _P_DP_Detail_ID 
            End Get 
            Set(ByVal value As Integer
                _P_DP_Detail_ID = value 
            End Set 
        End Property 
 
        Public Property ShowDel() As Boolean 
            Get 
                Return _ShowDel 
            End Get 
            Set(ByVal value As Boolean
                _ShowDel = value 
            End Set 
        End Property 
 
        Public Property MeasureDescription() As String 
            Get 
                Return _MeasureDescription 
            End Get 
            Set(ByVal value As String
                _MeasureDescription = value 
            End Set 
        End Property 
 
        Public Property P_DP_Detail_Count() As Integer 
            Get 
                Return _P_DP_Detail_Count 
            End Get 
            Set(ByVal value As Integer
                _P_DP_Detail_Count = value 
            End Set 
        End Property 
 
        Public Property TotalAmount() As Decimal 
            Get 
                Return _TotalAmount 
            End Get 
            Set(ByVal value As Decimal
                _TotalAmount = value 
            End Set 
        End Property 
 
        Public Property Notes() As String 
            Get 
                Return _Notes 
            End Get 
            Set(ByVal value As String
                _Notes = value 
            End Set 
        End Property 
 
        Public Sub New(ByVal iID As IntegerByVal iShowDel As BooleanByVal iMeasureDescription As StringByVal iCount As IntegerByVal iTotal As Decimal
            P_DP_Detail_ID = iID 
            ShowDel = iShowDel 
            MeasureDescription = iMeasureDescription 
            P_DP_Detail_Count = iCount 
            TotalAmount = iTotal 
        End Sub 
    End Class 
 
    Private Sub RadButton1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles RadButton1.Click 
        RadGridView1.Rows.RemoveAt(0) 
    End Sub 
End Class 
 

Julian Benkov
Telerik team
 answered on 21 Apr 2010
1 answer
132 views
Hello!
I have some problems with RadDropDownButtonElements when using them in the RibbonBar control.
1st - I can´t expand the dropdown list of elements by clicking on the arrow at the design time, only at the run time.
2nd - The "imageList" option doesn´t appear in the  dropDownButton properties windows so I need to add images one by one for each element in my buttondropdown list.
3nd - the "column" where images are supposed to appear in the dropdown list of the DropDownButtonElement is always empty, so there is some kind of an empty tab on the left side of the list and then the image is represented followed by the text.
4th - Alsou can´t align text to left - it is always centered for any option I choose in the property window.

But everything works just fine (all 3 issues) since I'm using RadMenuDropDownButton out of ribbonBar.
Best Regards
Deyan
Telerik team
 answered on 21 Apr 2010
1 answer
107 views
Hello,

I want to ask, if there is a way to change or disable the context menu that is shown when a tab item header is clicked with right mouse button. You can see the menu in the attached image.

Thanks,
Burhan Eyimaya
Nikolay
Telerik team
 answered on 21 Apr 2010
1 answer
123 views

Hello,

I want to ask, if there is a way to change or disable the context menu that is shown when a tab item header is clicked with right mouse button. You can see the menu in the attached image.

Thanks,
Burhan Eyimaya

Nikolay
Telerik team
 answered on 21 Apr 2010
1 answer
451 views
I'm trying to set the focus to the first control on my screen, which is a radio button inside a RadPanel. When I try button.focus() or button.select(), nothing happens. If I set the focus to a text box not inside a panel, it works fine.
Ruth Goldberg
Top achievements
Rank 1
 answered on 21 Apr 2010
3 answers
67 views
When using the Office 2010 skin, the MDI child doesn't have the minimize/maximize/close options at the top right.
Nikolay
Telerik team
 answered on 21 Apr 2010
2 answers
149 views
Hi Telerik Team,

In a datagridview, I have filters enabled on columns.
I would like to customize the Complex filter with my own skin.
You can see my explanation in the 2 attachments.

Regards,
Claude IMBERT
Top achievements
Rank 1
 answered on 21 Apr 2010
1 answer
165 views
Hello,

I am trying to hide the close, minimize, maximize buttons in a RadTitleBar with the following code.
_titleBar.TitleBarElement.CloseButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;  
_titleBar.TitleBarElement.MaximizeButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;  
_titleBar.TitleBarElement.MinimizeButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed 

Close button is removed but minimize and maximize buttons remain. Is there a bug in the RadTitleBar or
am I doing something wrong.

Please help
Burhan Eyimaya
Deyan
Telerik team
 answered on 20 Apr 2010
6 answers
141 views
Hello,

I was wondering whether it was natively possible to move a tool window from one dock to another, or if we had to do the job manually using the drag drop events.

Any clue on how to enable this feature? The purpose is to achieve a Google Chrome like behaviour...

I have browsed the forum but unfortunately with no luck on this.

Thanks!
Martin Vasilev
Telerik team
 answered on 20 Apr 2010
1 answer
96 views
Hi, why this, doesnt works?, i have 3 columns, with fieldName and uniquename corresponding to each gridviewsummaryitem. (Bets and Wins are decimal type, and Fecha is DateTime with FormatString = "{0:d}")
Im using the version: 2010.1.10.218.

private
void radButton1_Click(object sender, EventArgs e)

{

radGridView1.DataSource =

 

new ManageGeneralAgent().GetGeneralBalance().ToList();

 

}

 

public

 

 

frmReports()

 

{

 

 

    GridViewSummaryRowItem

 

 

summaryRow = new GridViewSummaryRowItem();

 

    summaryRow.Add(

 

new GridViewSummaryItem("Fecha", "", GridAggregateFunction.None));

 

    summaryRow.Add(

 

new GridViewSummaryItem("Bets", "Total : {0}", GridAggregateFunction.Count));

 

    summaryRow.Add(

 

new GridViewSummaryItem("Wins", "Total : {0}", GridAggregateFunction.Sum));

 

    radGridView1.MasterGridViewTemplate.SummaryRowsBottom.Add(summaryRow);
}

Jack
Telerik team
 answered on 20 Apr 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
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
+? 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?