Telerik Forums
UI for WinForms Forum
1 answer
169 views
Hello,

I can't seem to trap any Function keys while editing a cell on the radGridView. Could you provide any clues where I am going wrong? I have practically copied the code from your help documentation. If I press Ctrl+L then all works fine.

Regards

Terry

Public Class Form1
  
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  
  
        Me.KeyPreview = True
  
        Dim x As Boolean
        x = LogIntoSQL()
  
        If x = True Then
            Try
                myList = New BindingList(Of CompanyHistory)()
                LoadNewCompanyHistory()
                RadGridView1.DataSource = myList
  
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End If
  
         
  
    End Sub
  
     
    Private tbSubscribed As Boolean = False
  
    Private Sub radGridView1_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs)
        Dim tbEditor As RadTextBoxEditor = TryCast(Me.RadGridView1.ActiveEditor, RadTextBoxEditor)
        If Not tbEditor Is Nothing Then
            If (Not tbSubscribed) Then
                tbSubscribed = True
                Dim tbElement As RadTextBoxEditorElement = CType(tbEditor.EditorElement, RadTextBoxEditorElement)
                AddHandler tbElement.KeyDown, AddressOf tbElement_KeyDown
            End If
        End If
    End Sub
  
    Private Sub tbElement_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
        If e.Control Then
            If e.KeyCode = Keys.F1 Then
                CType(sender, RadTextBoxEditorElement).Text = "F1"
            End If
  
            If e.KeyCode = Keys.F2 Then
                CType(sender, RadTextBoxEditorElement).Text = "F2"
            End If
  
            If e.KeyCode = Keys.L Then
                CType(sender, RadTextBoxEditorElement).Text = "LLLL"
            End If
  
        End If
  
  
    End Sub
  
    Public Sub New()
  
        ' This call is required by the designer.
        InitializeComponent()
  
        ' Add any initialization after the InitializeComponent() call.
        AddHandler RadGridView1.CellEditorInitialized, AddressOf radGridView1_CellEditorInitialized
    End Sub
End Class

 

 

 

 

 

 

 

 



Emanuel Varga
Top achievements
Rank 1
 answered on 06 Apr 2011
2 answers
205 views
Hi

I have created a button in code like this:

 

 

Dim RadRibbonBarGroup_Main = New RadRibbonBarGroup()

 

 

 

 

Dim RadRibbonBarButtonGroup_Main = New RadRibbonBarButtonGroup

 

 

 

Dim btnExtract As New RadButtonElement()

 

 

RadRibbonBarGroup_Main.Items.AddRange(

 

New Telerik.WinControls.RadItem() {RadRibbonBarButtonGroup_Main})

 

 

RadRibbonBarGroup_Main.Name =

 

"RadRibbonBarGroup_Main"

 

RadRibbonBarGroup_Main.Text =

 

"Extract Data"

 

RadRibbonBarGroup_Main.Alignment =

 

ContentAlignment.TopCenter

 

 

btnExtract.Name =

 

"btnExtract"

 

btnExtract.Text =

 

"Extract"

 

btnExtract.Class =

 

"ButtonElement"

 

btnExtract.Image =

 

Global.culminTelFormLib.My.Resources.Resources.Database_export_32()

 

 

btnExtract.ImageAlignment = System.Drawing.

 

ContentAlignment.MiddleCenter

 

 

btnExtract.TextImageRelation = System.Windows.Forms.

 

TextImageRelation.ImageAboveText

 

 

RadRibbonBarButtonGroup_Main.Items.AddRange(

 

New Telerik.WinControls.RadItem() {btnExtract})

 

 

RadRibbonBarButtonGroup_Main.Name =

 

"RadRibbonBarButtonGroup_Main"

 

RadRibbonBarButtonGroup_Main.Text =

 

"RadRibbonBarButtonGroup_Main"

 

RadRibbonBarButtonGroup_Main.Alignment =

 

ContentAlignment.TopCenter

 

 

 

 

Me.tabHome.Items.Insert(0, RadRibbonBarGroup_Main)

 



Now I want to use the click event. How would I go about doing this?

I have tried adding the following code to the form but it still does not work. What am I doing wrong?:

Public WithEvents btnExtract As Telerik.WinControls.UI.RadButtonElement


 

 

Protected Sub btnExtract_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExtract.Click

 

 

 

 

If IsNothing(frmLoad) Then

 

frmLoad =

 

New frmTaxSageLoad

 

frmLoad.Show()

frmLoad.WindowState =

 

FormWindowState.Maximized

 

 

 

 

Else

 

frmLoad.BringToFront()

 

 

End If

 

 

 

End Sub

 


Thanks
Celeste
Celeste Zietsman
Top achievements
Rank 2
 answered on 06 Apr 2011
1 answer
101 views
Hello,
I used menu system from demo application using Treeview. With new version it wont work. I need set different font height for different parts of TreeView. Is it possible to set different font size for Root element and different size for other elements?
ItemHeight property of RadTreeNode does not work. TreeViewElement is NULL, so also this does not work:
myNode.TreeViewElement.ItemHeight = 30;

Use demo application latest treeview or older one?
beavisCZ
Top achievements
Rank 1
 answered on 06 Apr 2011
8 answers
723 views
Hi all,

I've found literally thousands of examples, tutorials, videos and posts showing me how to use the gridview effectively to DISPLAY data..  I have that down pat... What I haven't been able to find are examples of how to SAVE new or updated rows back to the DB.

I know it works very easily using all the drag and drop within VS.. my issue is I have to work with SQL Server 2000, which is not supported with any VS drag and drop.. so I'm having to use a combination of business objects and data tables to bind to my gridview.

What I need is to know how to allow the user to change data in these grids and save the data back to SQL2000..

Any help would be greatly appreciated!

Thanks,

Matt
Julian Benkov
Telerik team
 answered on 06 Apr 2011
2 answers
138 views
I am using an unbound grid. Adding columns and rows programmatically to the grid in a sub procedure I am calling InitializeGrid. At the end of this initialize procedure I have the following code

 

 

AddHandler RadGridView1.DefaultValuesNeeded, AddressOf radGridView1_DefaultValuesNeeded

 

This works fine when the user clicks on "Click here to add a new row" message. It assigns the default values as specified in the radGridView1_DefaultValuesNeeded sub. But it doesn't work when I do that programmatically by calling the RadGridView1.Rows.AddNew method.  How can I programmatically mimic the user clicking on "Click here to add a new row"?

Thank you
Bijimon
Top achievements
Rank 1
 answered on 06 Apr 2011
1 answer
161 views
Hello,
i implemented export to excel using RadGridViewExcelExporter and i have some question:
1. In grid i have radgridcomboboxcolumn and i use dictionary to show data f.e
 DataSource = bindingSource(Dictionary)
 Display member = Value
 Fieldname = Id
 ValueMember = Key
 when i export data to excel in this column i have Id but i want to export Value f.e "Dog". Can I change it ?
2. RadGridViewExcelExporter is very slow f.e 1000 rows ;/, can i optymize this mechanism ?
3. I try to use ExportCSV, but i have comma separated "," and in excel i must have ";" for good formatting, can i change it ?
Thanks for any help.
Emanuel Varga
Top achievements
Rank 1
 answered on 05 Apr 2011
1 answer
129 views
Hi,

I have a hierarchical gridview, for which I want to add more than one relations. I tried adding one relation between my master template and child template as explained by you in the link http://www.telerik.com/help/winforms/gridview-hierarchical-grid-tutorial-binding-to-hierarchical-data.html, it works perfectly fine and I was able to view the rows in the parent and child grids.

But when I try to add more than one relations between my master and child template in the GridViewRelation Collection Editor, it doesnt work and no error messages at all. My parent grid is getting populated but when I try to expand the + link, my child grid is not getting displayed. (The columns values are same).

Need you help on this.

Regards,
Gokul
Richard Slade
Top achievements
Rank 2
 answered on 05 Apr 2011
5 answers
195 views
Hi,

I have two level object related hierarchy grid.
Child object field depends on Parent object field.
When changing a value in parent object it does not update children rows.
But it updates parent row itself. We can see it on C field which depends on that value too.

Here is the code:
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        List<A> glist;
        public RadForm1()
        {
            InitializeComponent();
            glist = new List<A>();
 
            A objA = new A();
            objA.B = 10;
            objA.L.Add(new B("asdf1"));
            objA.L.Add(new B("asdf2"));
            objA.L.Add(new B("asdf3"));
            objA.L.Add(new B("asdf4"));
 
            A objB = new A();
            objB.B = 20;
            objB.L.Add(new B("f1"));
            objB.L.Add(new B("f2"));
            objB.L.Add(new B("f3"));
            objB.L.Add(new B("F4"));
 
            glist.Add(objA);
            glist.Add(objB);
 
            gv.DataSource = glist;
            gv.AutoGenerateHierarchy = true;
            gv.Columns["L"].IsVisible = false;             
        }
 
        class A
        {
            List<B> list;
            int b;
            int c;
            public A()
            {
                list = new List<B>();
            }
            public List<B> L
            {
                get { return this.list; }
                set { this.list = value; }
            }
            public int B
            {
                get {return this.b;}
                set
                {
                    this.b = value;
                    this.c = value * 5;
                    foreach (B bb in L)
                        bb.a = value;
                }
            }
            public int C
            {
                get { return this.c; }
            }
        }
        class B
        {
            int _a;
            string _b;
            public B()
            { }
            public B(string stringparam)
            {               
                b = stringparam;
            }
            public int a
            {
                get { return this._a; }
                set { this._a = value; }
            }
            public string b
            {
                get { return this._b; }
                set { this._b = value; }
            }
        }
}

Julian Benkov
Telerik team
 answered on 05 Apr 2011
2 answers
294 views
Hi

Is it possible to do a multi select on a RadDropDownList or a RadMultiColumnComboBox?

Thanks
Celeste
Celeste Zietsman
Top achievements
Rank 2
 answered on 05 Apr 2011
4 answers
94 views
Updated to Q1 2011 and noticed the ExpandLevel call didn't make it over to the new TreeView. Is there an equivalent, or do I have to write a loop to manually do it?

If so, can I request the ability to do this come back? 

Thanks

-Matt
Ian
Top achievements
Rank 1
 answered on 05 Apr 2011
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?