Telerik Forums
UI for WinForms Forum
1 answer
191 views

Hello All,
I have a task to evaluate Telerik GridView, but I'm stacked with a problem.
I need to create hierarchical RadGridView, but scenario where I will bind on startup Master and Childs Templates is not good for me, because most of the data in ChildGrid will be shown only on expanding, and in my scenario getting all the data is too expensive.
So I'm trying to populate Rows collection of ChildGridView template on ChildViewExpanding event.
And here where I have a problem. After first time I expand on + I have correct content, but then I collapse, and expand again, there is no content ( and in code Rows collection is properly filled with data ).
I found some threads on forum where other have similar issues, and conclusion was that Hierarchy can't be created dynamically and updated on expanding event.

What I'm missing here, or is this as designed?
Is there workaround for this( or way to simulate same behavior), or my best choice is to bring new GridView when user click master grid.

Thanks in advance.
Regards

Julian Benkov
Telerik team
 answered on 10 Jun 2009
1 answer
221 views
Hi,
I am using raddropdownbutton in my application. It is working perfectly. Am able to populate elements in the button etc. I have doubt in controling the visible area where elements are displayed. Say i want  the display area such that only 10 items can be visible and by scrolling down i like to see the other items. Can you please suggest me some solution to achieve my requirement.

Thanks,
Veda.
Boryana
Telerik team
 answered on 10 Jun 2009
1 answer
92 views
Hi

Thanks for beta update

In instructions to set up - it states update references to new dll's

When I right clicked references in the windows project there was no ability to update

Does that mean I have to delete each existing telerik reference and create a new one or is there another automatic or manual method I could use to update them please

Rgds
Stephen  
Stephen
Top achievements
Rank 1
 answered on 10 Jun 2009
6 answers
123 views
Hi there,

I have got problems regarding serialization/deserialization of docking layouts.

1.) When I adjust the width or height of an auto hidden window, this size won't be stored anyhow. If I reload the layout the size is alwas set to a default size. So the user have no chance to adjust the width or height of auto hidden windows permanently. I can reproduce this behaviour with the RadControls for WinForms example application under "RadDock-->Serialization". For me it seems that the size of an autohidden window isn't stored in the xml file at all. Am correct there? What can I do?

2.) When having a floating window the size of this window will not be restored correctly. Its size decreases everytime saving and loading the layout to xml. This behaviour can be reproduced in the sample application, too!

Please help ...


Best regards,
Oliver Bollmann

Vassil Petev
Telerik team
 answered on 09 Jun 2009
1 answer
130 views
How do I determine a child form's index number located in DockManager.MdiChildren collection?  In other words, I'm trying to determine what tab a child form belong's to.  I tried the following code:

System.Array.IndexOf(oDockingManager.MdiChildren, oClientForm)

I only get 0 as a result, no matter which tab the form is located in.  Any help would be appreciated.

Thanks,

Mitch

Nikolay
Telerik team
 answered on 09 Jun 2009
2 answers
80 views
Hello,

I use Microsoft Visual Basic 2008 Express Edition and I'm having trouble integrating RibbonBar on my Form.

I followed your tutorial >>> http://www.telerik.com/help/winforms/ribbonbarquickstart.html

But I have no RadRibbonBar in my toolbox. Can you tell me how to add control ?

Thank you
Jérôme
Top achievements
Rank 1
 answered on 09 Jun 2009
2 answers
133 views
I want to undo this command:

        Me.OrderStatusRadGridView.MasterGridViewTemplate.GroupByExpressions.Add("OrderType GroupBy OrderType")
        Me.OrderStatusRadGridView.MasterGridViewTemplate.GroupByExpressions.Add("OrderStatus GroupBy OrderStatus")

and redo as I need to.

The documentation shows to how to add groups programically but not remove them.

Thank you


Jack
Telerik team
 answered on 08 Jun 2009
1 answer
100 views
I would like to run a applicationwide hotkey which enables the user to execute a specific command (eg maximizing all mdi forms) pressing alt-enter

When using this code it works:

ChordModifier1.AltModifier =

True

 

 

ChordModifier1.ControlModifier =

False  

 

 

ChordModifier1.ShiftModifier =

False  

 

 

Chord1.ChordModifier = ChordModifier1

Chord1.Keys =

"Alt+Y"  

 

 

InputBinding1.Chord = Chord1 

ClickCommand1.Name = "ActionCommand"

 

ClickCommand1.OwnerType =

GetType(Telerik.WinControls.RadItem)  

 

 

InputBinding1.Command = ClickCommand1  

InputBinding1.CommandContext =

Me.rbeWindowsMaximize

However when I use

Chord1.Keys = "Alt+Enter"

it does not work. How can I get Alt-Enter to work?
thnx
Walther

 

 

 

 

 

Deyan
Telerik team
 answered on 08 Jun 2009
1 answer
171 views
Hi,

I am attempting to create a manual type of contextmenu for a radgroupbox. I add radiobuttons to the radgroup box, then 2 menu items, one is Add MA, the other is Remove MA. The Add MA should expand to the right and then down and show the selection of MA's to add. The remove would of course getElementAt and remove one of the radiobutton controls. Every attempt I have made the second menuitem never opens up. Code is below, any help would be apprecaited.

        private void setup_ma() 
        { 
            // Intialize MA object 
            ma_list = new sch_objects.MA_List(profile_list.Locationid, profile_list.Installerid); 
            ma_add_menu = new Telerik.WinControls.UI.RadDropDownMenu(); 
            ma_all_menu = new Telerik.WinControls.UI.RadDropDownMenu(); 
 
            // Create RadioButton grouped list in groupbox to display primary button with radio, not selectable 
            int count = ma_list.MA_list_forinstallerID.Rows.Count; 
            Telerik.WinControls.UI.RadRadioButton[] radio_btn = new Telerik.WinControls.UI.RadRadioButton[count]; 
            DataRow row; 
            Telerik.WinControls.UI.RadMenuItem main_item; 
 
            // Array of MA's in Installer Profile 
            for (int i = 0; i < count; i++) 
            { 
                row = ma_list.MA_list_forinstallerID.Rows[i]; 
                radio_btn[i] = new Telerik.WinControls.UI.RadRadioButton(); 
                radio_btn[i].Text = row["ma"].ToString(); 
                radio_btn[i].Name = "rb" + radio_btn[i].Text; 
                radio_btn[i].Location = new Point(12, 21 * (i+1)); 
                if ((bool)row["primaryma"]) 
                { 
                    radio_btn[i].ToggleState = Telerik.WinControls.Enumerations.ToggleState.On; 
                    radio_btn[i].Text = radio_btn[i].Text + " [Primary]"; 
                } 
                // For Toggling Primary MA 
                radio_btn[i].Click += new EventHandler(MA_Clicked); 
                // For manually opening a right click context menu 
                radio_btn[i].MouseDown += new MouseEventHandler(ma_radio_mousedown); 
            } 
 
            // Add "Add" button to group 
            Telerik.WinControls.UI.RadMenuItem[] item = new Telerik.WinControls.UI.RadMenuItem[ma_list.MA_list_forlocid.Rows.Count]; 
            int item_counter = 0
            foreach (DataRow ma_row in ma_list.MA_list_forlocid.Rows) 
            { 
                // Create MA's for add group 
                item[item_counter] = new Telerik.WinControls.UI.RadMenuItem(); 
                item[item_counter].Text = ma_row["ma"].ToString(); 
                item[item_counter].Name = "RI" + ma_row["ma"].ToString(); 
                item[item_counter].Click += new EventHandler(add_ma_click); 
                foreach (Telerik.WinControls.UI.RadRadioButton radio in radio_btn) 
                { 
                    if (radio.Name == ma_row["ma"].ToString()) 
                    { 
                        // Delete from group if they already exist in groupbox 
                        item[item_counter].Enabled = false
                    } 
                } 
                item_counter++; 
            } 
            // Menu MA "Add" Dropdown menu 
            main_item = new Telerik.WinControls.UI.RadMenuItem("Add"); 
            ma_add_menu.Items.Add(main_item); 
            ma_all_menu.Items.Add(main_item); 
 
            // Add MA Group to "Add" menuitem 
            main_item.Items.AddRange(item); 
 
            // Add "Remove MA" button to group, get MA by element location later 
            Telerik.WinControls.UI.RadMenuItem sec_item = new Telerik.WinControls.UI.RadMenuItem("Remove MA"); 
            sec_item.Click += new EventHandler(remove_ma_click); 
            ma_all_menu.Items.Add(sec_item); 
             
            ma_groupbox.MouseDown += new MouseEventHandler(ma_groupbox_MouseDown); 
            ma_groupbox.Controls.AddRange(radio_btn); 
        } 
 
        void ma_radio_mousedown(object sender, MouseEventArgs e) 
        { 
            if (e.Button == MouseButtons.Right) 
            { 
                ma_all_menu.Show(ma_groupbox, e.Location); 
            } 
        } 
 
        void ma_groupbox_MouseDown(object sender, MouseEventArgs e) 
        { 
            if (e.Button == MouseButtons.Right) 
            { 
                ma_add_menu.Show(ma_groupbox, e.Location); 
            } 
        } 

Victor
Telerik team
 answered on 08 Jun 2009
1 answer
152 views
I have a GridView that I populate manually using OpenFileDialog...

        Dim fname As String = ""

        If (dlgImportClients.ShowDialog() = Windows.Forms.DialogResult.OK) Then
            fname = dlgImportClients.FileName
        End If

        Dim TextLine As String = ""
        Dim SplitLine() As String

        If System.IO.File.Exists(fname) = True Then
            Dim objReader As New System.IO.StreamReader(fname)

            Do While objReader.Peek() <> -1
                TextLine = objReader.ReadLine()

                'need to add false for checkbox column
                TextLine = "False," + TextLine

                SplitLine = Split(TextLine, ",")

                dgvClients.ColumnCount = SplitLine.Count
                dgvClients.MasterGridViewTemplate.AllowAddNewRow = False
                dgvClients.ReadOnly = False
                dgvClients.Columns(0).IsVisible = True

                'if .RowCount = 0 then we are processing the first row
                If dgvClients.RowCount = 0 Then
                    For i = 1 To SplitLine.Count - 1
                        With dgvClients
                            .Columns(i).HeaderText = SplitLine(i).ToString
                            .Columns(i).BestFit()
                        End With
                    Next
                End If
                dgvClients.Rows.Add(SplitLine)
            Loop

            'stupid but the only way I could get the datagridview to populate correctly
            If dgvClients.RowCount > 1 Then
                dgvClients.Rows.RemoveAt(0)
            End If
        Else
            RadMessageBox.SetThemeName("Breeze")
            RadMessageBox.Show("File Does Not Exist")
        End If

I am loading the .CSV file to the GridView so that it can be reviewed, cleaned up, and then imported into Clients table within the customers database.

I'm kinda stumped as to the best way to get the data in the GridView into the database. Could just be a brain fart or I may be going about this totally wrong. Any insight would be greatly appreciated.

Victor
Telerik team
 answered on 08 Jun 2009
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
ProgressBar
CheckedDropDownList
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?