Telerik Forums
UI for WinForms Forum
3 answers
123 views
Hi,

I have a performance problem.
I load the GridView 2009 Q1 with Tabkeadapter fill method. The Data comes from a view on a ms sql server and contains over 500.000 rows.
The performance is really slow.

What is the best method to give the user the best performance.
Is the Method with the table adapter good?

I thought about only showing about 1000 rows and after applying a filter generating a new query to execute against the db and refill the tableadapter.

Please help,

Thank you very much
Christoph
Top achievements
Rank 1
 answered on 30 Mar 2009
3 answers
185 views
Hi,

I've got a question on how best to accomplish drill down on a grid. The basic user experience should be to load up the form with a grid, and then click on any row's down arrow and see the grid expand to view related records (heirarchical grid).

I've currently got it working by creating 2 lists and setting up the relationship between them. What I'm wondering is if it's possible to set it up so that I can call the child object in the datasource to be the sub grid.

eg
Order has a property called 'OrderItems' which contains a list of all order items. In order to display on a grid, I need to call seperately a 'GetOrders' and a 'GetOrderItems', and then put the two together.

How would I get the grid to use Order.OrderItems as a data source instead? I suspect it would have to be an unbound grid, which is OK, but then I just need to know how to create a hierarchical unbound grid! Potentially it'd be nice to automatically generate a sub grid based on the properties of a sub object.
Nikolay
Telerik team
 answered on 30 Mar 2009
9 answers
632 views
Hi!
I'm trying to change a standart column to a combobox Column.
My way is to remove the original column with:
RadGridSubstances.Columns.Remove(RadGridSubstances.Columns("uzs_PosNeg")) 

and add a new GridViewComboBoxColumn with:
Dim comboBoxColumn As New GridViewComboBoxColumn 
comboBoxColumn.HeaderText = "positiv/negativ" 
comboBoxColumn.FieldName = "uzs_PosNeg" 
comboBoxColumn.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList 
 
 ' Create Custom Table for Combobox 
Dim comboDT As New DataTable 
comboDT.Columns.Add("Name"GetType(System.String)) 
comboDT.Columns.Add("Wert"GetType(System.Int16)) 
Dim myNewRow As DataRow = comboDT.NewRow() 
myNewRow("Name") = "positiv" 
myNewRow("Wert") = 1 
comboDT.Rows.Add(myNewRow) 
Dim myNewRow2 As DataRow = comboDT.NewRow() 
myNewRow2("Name") = "negativ" 
myNewRow2("Wert") = 0 
comboDT.Rows.Add(myNewRow2) 
 
comboBoxColumn.DataSource = comboDT 
comboBoxColumn.ValueMember = "Wert" 
comboBoxColumn.DisplayMember = "Name" 
comboBoxColumn.FieldName = "uzs_PosNeg" 
RadGridSubstances.Columns.Add(comboBoxColumn) 

At least I have two columns one with the Headertext "uzs_PosNeg" and one with the Headertext "positiv/negativ" (the ComboBoxColumn) When I change the Value in the Combobox (and change the row)  - the value in the other column changes and the Combobox displays nothing.

How could I do this? Is there an easyer way to assign two values to the combobox instead of creating a Datatable?

regards
Willi
Nikolay
Telerik team
 answered on 30 Mar 2009
1 answer
116 views

hi telerik,

I am working on winforms version Q2 2008 SP1 using a GridView control with one

imageCOlumn and three textboxColumns and a image list in that i have four images. I am using a

BindingList to bind the Grid, when i load the Grid initially it should not show image in the

imageColumn and all other textboxColumns gets filled with data.

Now, how can i fill the imageColumn of the Grid for a particular row based on the context menu that

consists of four images such that my imagecolumn gets filled with one of the images that i select from

the right click context menu.

how can i implement the above functionality, any help.

thanks and regards,
Vasu.

Nick
Telerik team
 answered on 30 Mar 2009
1 answer
119 views
Hello -

I'm creating a RadElement hierarchy composed of nested panels & various elements, and I'd like to insert a RadGridView under one of the nested StackLayoutPanels.  Can you tell me how to do this?

Thanks,
Michael Hewitt
Precision Software Design, LLC

Jack
Telerik team
 answered on 30 Mar 2009
1 answer
126 views
Can you please have a look at this post:
 
http://www.telerik.com/community/forums/winforms/treeview/in-place-editing-gives-error-for-self-referenced-tree-view-databinding.aspx#779905

Regards,

Rickar Nilsson
Victor
Telerik team
 answered on 30 Mar 2009
3 answers
159 views
Hi,

I created a static class named GlobalMessageBox.

Inside this class, I set ThemeName for all RadMessageBox.Show

For example,
        /// <summary> 
        /// Displays RadMessageBox with specified text.  
        /// </summary> 
        /// <param name="text">The text to display in the RadMessageBox.</param> 
        /// <returns>One of the <see cref="T:System.Windows.Forms.DialogResult"></see> values</returns> 
        public static DialogResult Show(string text) 
        { 
            RadMessageBox.SetThemeName(_theme); 
            return RadMessageBox.Show(text); 
        } 

For the theme, I setted a const like this,
        private const string _theme = "Telerik"

In previous version (I have the last one available), it worked. Now, sometime, it crash. (for example, in a form with a huge gridview).
I found a way to "patch" this with :
        private static string _theme = "Telerik"

This is really strange. If somebody can explain me.

Best regards,
Fabien


Martin Vasilev
Telerik team
 answered on 30 Mar 2009
5 answers
204 views
Hi, what special things do I need to do to correctly put a background on the RadCarousel?    If you drag and drop a carousel onto the form I expect to just set the BackgroundImage property and go.. but it doesn't seem to work.

No expense was spared in trying to get this to work and eventually I found by manually adding the following line to the designer code behind I got it to display:

((Telerik.WinControls.Primitives.FillPrimitive)(this.rcFilterOptions.GetChildAt(0).GetChildAt(0))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;

Naturally this was not the first line of code I tried.. I guess I will put that line of code in the FormLoad in case it gets overwritten if I change the design.  Please advise if thre is a better/more correct way of getting the background to display.. and if not, please consider this a bug report, or at best, documentation request.  My apologies if I missed something when reading the docs and existing forum requests.

My carousel looks awesum now, btw :)

Cheers
  Ewart.
Peter
Telerik team
 answered on 30 Mar 2009
1 answer
64 views
Hi,

when using the dockmanger i have 2 panels.

A
B

B must always remain the same height when form resizes.

Any idea on how to accomplish this?

Thank you.
Julian Benkov
Telerik team
 answered on 30 Mar 2009
4 answers
210 views
Hi

I am trying my first RadGridView bound to a bindingsource which is bound to a link to sql query result.

When I intially setup the RadGridView I set the datasource to an object which is the linq to sql datacontext class for that table.

I have formatted the grid to only display 2 of the many available fields and specially formated them size and header title.

However the formatting changes I have made do not appear and I get a generic 2 50 char cols. However in the designer it looks ok.

If I edit the designer.cs code and change the IsAutoGenerated to false my formatted cols appear but also two defaulted cols.

What am I doing wrong?

form.cs code
    public partial class OrganizationsForm : Telerik.WinControls.RadForm  
    {  
        private CallDataClassesDataContext db;  
 
        public OrganizationsForm()  
        {  
            InitializeComponent();  
 
            db = new CallDataClassesDataContext();  
 
            var OrganizationQuery = from organ in db.Organizations  
                                    orderby organ.Name  
                                    select new 
                                    {  
                                        organ.OrganizationId,  
                                        organ.Name  
                                    };  
 
            organizationBindingSource.DataSource = OrganizationQuery;  
        }  
    }  
 

designer.cs code
        private void InitializeComponent()  
        {  
            this.components = new System.ComponentModel.Container();  
            Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn1 = new Telerik.WinControls.UI.GridViewDecimalColumn();  
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn();  
            this.organizationBindingSource = new System.Windows.Forms.BindingSource(this.components);  
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();  
            ((System.ComponentModel.ISupportInitialize)(this.organizationBindingSource)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();  
            this.SuspendLayout();  
            //   
            // organizationBindingSource  
            //   
            this.organizationBindingSource.DataSource = typeof(CallMaintain.Organization);  
            //   
            // radGridView1  
            //   
            this.radGridView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));  
            this.radGridView1.Cursor = System.Windows.Forms.Cursors.Default;  
            this.radGridView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);  
            this.radGridView1.ForeColor = System.Drawing.SystemColors.ControlText;  
            this.radGridView1.ImeMode = System.Windows.Forms.ImeMode.NoControl;  
            this.radGridView1.Location = new System.Drawing.Point(13, 13);  
            //   
            //   
            //   
            this.radGridView1.MasterGridViewTemplate.AllowColumnChooser = false;  
            this.radGridView1.MasterGridViewTemplate.AllowColumnResize = false;  
            this.radGridView1.MasterGridViewTemplate.AllowDeleteRow = false;  
            this.radGridView1.MasterGridViewTemplate.AllowDragToGroup = false;  
            gridViewDecimalColumn1.AllowGroup = false;  
            gridViewDecimalColumn1.AllowResize = false;  
            gridViewDecimalColumn1.DataType = typeof(int);  
            gridViewDecimalColumn1.FieldAlias = "OrganizationId";  
            gridViewDecimalColumn1.FieldName = "OrganizationId";  
            gridViewDecimalColumn1.FormatInfo = new System.Globalization.CultureInfo("");  
            gridViewDecimalColumn1.HeaderText = "OrganizationId";  
            gridViewDecimalColumn1.IsAutoGenerated = true;  
            gridViewDecimalColumn1.ReadOnly = true;  
            gridViewDecimalColumn1.UniqueName = "OrganizationId";  
            gridViewDecimalColumn1.VisibleInColumnChooser = false;  
            gridViewDecimalColumn1.Width = 80;  
            gridViewTextBoxColumn1.AllowGroup = false;  
            gridViewTextBoxColumn1.FieldAlias = "Name";  
            gridViewTextBoxColumn1.FieldName = "Name";  
            gridViewTextBoxColumn1.FormatInfo = new System.Globalization.CultureInfo("");  
            gridViewTextBoxColumn1.HeaderText = "Name";  
            gridViewTextBoxColumn1.IsAutoGenerated = true;  
            gridViewTextBoxColumn1.UniqueName = "Name";  
            gridViewTextBoxColumn1.VisibleInColumnChooser = false;  
            gridViewTextBoxColumn1.Width = 250;  
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewDecimalColumn1);  
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn1);  
            this.radGridView1.MasterGridViewTemplate.DataSource = this.organizationBindingSource;  
            this.radGridView1.MasterGridViewTemplate.EnableGrouping = false;  
            this.radGridView1.Name = "radGridView1";  
            this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No;  
            this.radGridView1.ShowGroupPanel = false;  
            this.radGridView1.Size = new System.Drawing.Size(381, 150);  
            this.radGridView1.TabIndex = 0;  
            this.radGridView1.Text = "radGridViewPreview";  
            //   
            // OrganizationsForm  
            //   
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);  
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;  
            this.ClientSize = new System.Drawing.Size(406, 276);  
            this.Controls.Add(this.radGridView1);  
            this.Name = "OrganizationsForm";  
            this.Text = "Organizations";  
            this.ThemeName = "Office2007Blue";  
            ((System.ComponentModel.ISupportInitialize)(this.organizationBindingSource)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();  
            this.ResumeLayout(false);  
            this.PerformLayout();  
 
        }  
 

Thanks Paul
Julian Benkov
Telerik team
 answered on 30 Mar 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
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?