Telerik Forums
UI for WinForms Forum
2 answers
214 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
106 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
751 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
141 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
164 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
133 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
200 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
299 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
9 answers
456 views
hi all
i am not getting default cellcontextmenu on grid view right click
previously i disabled it.
and now i want it to work,but its not even after setting allowCellContextMenu to true.
Actually i want to allow copy on a cell and paste  it to any of the filter property.
plz help me
norma
Top achievements
Rank 1
 answered on 04 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
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?