Telerik Forums
UI for WinForms Forum
1 answer
105 views
How system decides the height of the Child Grid ?  When there are no child records the grid height seems to be quite small .
I want set the height of child grid to a fixed size.  How can i do that ?

Regards
Lee.
Martin Vasilev
Telerik team
 answered on 18 Mar 2010
6 answers
422 views
I am having a problem with the RadGridView not allowing the user to re-order the columns via column header dragging after the grid has been bound to a data source. I can click and begin to drag a column header, however once I release the mouse button, the column returns to its original position, not the position I dropped it at. This only happens after I have bound the grid to a datasource.

Am I doing something wrong or is this expected behavior?

Using GridView version 2009.2.9.729

The code below is a form with a RadGridView and 3 columns. After I click the bind button, I can no longer re-order columns:

using System;  
using System.Drawing;  
using System.Windows.Forms;  
using System.ComponentModel;  
using Telerik.WinControls.UI;  
 
namespace TelerikGridTest  
{  
    public partial class SimpleGridTest : Form  
    {  
        private Telerik.WinControls.UI.RadGridView radGridView1;  
 
        private void btnBind_Click(object sender, EventArgs e)  
        {  
            BindingList<SomeObject> data = new BindingList<SomeObject>();  
            data.Add(new SomeObject("1.1", "1.2", "1.3", "1.4"));  
            data.Add(new SomeObject("2.1", "2.2", "2.3", "2.4"));  
            data.Add(new SomeObject("3.1", "3.2", "3.3", "3.4"));  
 
            radGridView1.DataSource = data;  
            //now I can't re-order columns  
        }  
 
        private void btnUnbind_Click(object sender, EventArgs e)  
        {  
            radGridView1.DataSource = null;  
        }  
 
        public SimpleGridTest()  
        {  
            GridViewTextBoxColumn gridViewTextBoxColumn1 = new GridViewTextBoxColumn();  
            GridViewTextBoxColumn gridViewTextBoxColumn2 = new GridViewTextBoxColumn();  
            GridViewTextBoxColumn gridViewTextBoxColumn3 = new GridViewTextBoxColumn();  
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).BeginInit();  
            this.SuspendLayout();  
            this.radGridView1.Location = new System.Drawing.Point(15, 50);  
            gridViewTextBoxColumn1.FieldAlias = "Val1";  
            gridViewTextBoxColumn1.FieldName = "Val1";  
            gridViewTextBoxColumn1.HeaderText = "column1";  
            gridViewTextBoxColumn1.UniqueName = "column1";  
            gridViewTextBoxColumn1.Width = 150;  
            gridViewTextBoxColumn2.FieldAlias = "Val2";  
            gridViewTextBoxColumn2.FieldName = "Val2";  
            gridViewTextBoxColumn2.HeaderText = "column2";  
            gridViewTextBoxColumn2.UniqueName = "column2";  
            gridViewTextBoxColumn2.Width = 150;  
            gridViewTextBoxColumn3.FieldAlias = "Val3";  
            gridViewTextBoxColumn3.FieldName = "Val3";  
            gridViewTextBoxColumn3.HeaderText = "column3";  
            gridViewTextBoxColumn3.UniqueName = "column3";  
            gridViewTextBoxColumn3.Width = 150;  
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn1);  
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn2);  
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn3);  
            this.radGridView1.Name = "radGridView1";  
            this.radGridView1.Size = new System.Drawing.Size(600, 355);  
            Button btnBind = new Button();  
            btnBind.Text = "Bind to Data";  
            btnBind.Location = new Point(15, 15);  
            btnBind.Size = new Size(100, 25);  
            btnBind.Click += btnBind_Click;  
            this.Controls.Add(btnBind);  
            Button btnUnbind = new Button();  
            btnUnbind.Text = "Unbind from Data";  
            btnUnbind.Location = new Point(115, 15);  
            btnUnbind.Size = new Size(100, 25);  
            btnUnbind.Click += btnUnbind_Click;  
            this.Controls.Add(btnUnbind);  
            this.ClientSize = new System.Drawing.Size(630, 415);  
            this.Controls.Add(this.radGridView1);  
            this.Name = "SimpleGridTest";  
            this.Text = "SimpleGridTest";  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();  
            this.ResumeLayout(false);  
            this.PerformLayout();  
        }  
    }  
 
    public class SomeObject  
    {  
        public SomeObject() { }  
        public SomeObject(string val1, string val2, string val3, string val4)  
        {  
            Val1 = val1;  
            Val2 = val2;  
            Val3 = val3;  
            Val4 = val4;  
        }  
        public string Val1 { get; set; }  
        public string Val2 { get; set; }  
        public string Val3 { get; set; }  
        public string Val4 { get; set; }  
    }  
}  
 
Zsolt Hunyadi
Top achievements
Rank 1
 answered on 18 Mar 2010
2 answers
171 views
Hi room !

When I Select Cell on RadGridView, I want only color Cell Selected.

I don't want color border that row.

Help me!

Thanks 
jam ban
Top achievements
Rank 1
 answered on 18 Mar 2010
1 answer
76 views
Is there any way to remove the 3D effect on RadDropDownButtonElement controls that are added to a RadRibbonBar?  I hate the way it looks in 3D.  It seems to be based on the theme as changing my theme fixes the problem; however I want the color scheme of the Office2007 theme and that is where I have this terrible 3D effect on the borders.
Nikolay
Telerik team
 answered on 17 Mar 2010
3 answers
823 views
I've tried using a masked edit box for data that should be numbers only. I set the mask type to standard and the mask to "##########", which is supposed to allow optional numbers up to 10 characters. What happens is that I can't tab out of the field unless I've entered 10 numbers, which is not what I want. I want up to 10 digits. I can't find documentation for the numeric masks, only for standard and date time. I don't know if using a numeric mask would do the job.
Boyko Markov
Telerik team
 answered on 17 Mar 2010
1 answer
323 views
I have a Grid with is binded to a Typed Emp DataSet.
Emp table has a couple of columns of type bit. 
Grid automatically takes it as checkbox type of column.
When I click on AddNewRow area, it displays checkbox as UNchecked.
What i want to do is it should display checkbox as Checked. 

How to do this?

Regards
Lee

Martin Vasilev
Telerik team
 answered on 17 Mar 2010
1 answer
84 views
Hi,

I upgraded a project of mine that worked fine with all 2009 releases to radscheduler 2010 q1 and for some reason I noticed there when you click on a certain date the date that it shows in the edit appointment box is out by 1 day! So i created a new project and still get the same issue.

Steps to re-create:
-Create new project
-Add scheduler, navigator, datasource etc
-Group appointments by resource e.g.

"RadScheduler1.GroupType = Telerik.WinControls.UI.GroupType.Resource"


-run project, use scheuler navigator to change date
-click to add an appointment

Then note the date is out by 1 day...

Are there any work arounds or fixes planned for this?

Mark



Boyko Markov
Telerik team
 answered on 17 Mar 2010
4 answers
111 views
Hey Folks.

I'm currently stucked on a strange happening.

With the following code i'm formating a row, if cellvalue is changed.

private void gv_data_CellValueChanged(object sender, GridViewCellEventArgs e) 
        {             
            GridViewRowInfo r = e.Row; 
            ((GridCellElement)sender).RowElement.BackColor = Color.LightYellow; 
            ((GridCellElement)sender).RowElement.DrawFill = true;   
            r.Cells[1].Value = "1"
        } 

The BackColor appears to the row. Right so far.
But if im scrolling down then in the DataGridView, the formatting doesn't keep on its row, it's scrolling with.

Just want to highlight edited rows.

Any suggestions?

Kind regards, Tom


Nikolay
Telerik team
 answered on 17 Mar 2010
10 answers
235 views
Can anyone please help.. I have create multiple child hierarchical grid but i cant seem to see the fourth level and fifth level. I dont know if its the size of the child template is the problem or something else. Isn't the child template autoresized?

Here is a copy of my code, if the problem is not what i stated please tell me what i'm missing thanks!
 
if (list.Keys.Count > 0)
            {
                //Child Template
                GridViewTemplate template = new GridViewTemplate();
                template.AllowAddNewRow = false;
                template.Columns.Add(new GridViewTextBoxColumn("ParentID"));
                template.Columns.Add(new GridViewTextBoxColumn("ID"));
                template.Columns.Add(new GridViewTextBoxColumn("Key"));
                template.Columns.Add(new GridViewTextBoxColumn("Value"));
                parentTemplate.ChildGridViewTemplates.Add(template);
                //Relation
                GridViewRelation relation = new GridViewRelation(parentTemplate);
                relation.ChildTemplate = template;
                relation.ParentColumnNames.Add("ID");
                relation.ChildColumnNames.Add("ParentID");
                radGridView1.Relations.Add(relation);
                //Get Key and Value
                foreach (string str in list.Keys)
                {
                    GridViewTemplate newTemplate = parentTemplate.ChildGridViewTemplates[0];
                    newTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
                    childCtr = childCtr + 1;
                    string strCtr = parentID.ToString() + childCtr.ToString();

                    if (list.ValueIsList(str))
                    {                        
                        LogEntryPropertyList listChild = list.GetList(str);
                        newTemplate.Rows.Add(parentID, strCtr, str, null);
                        newTemplate.Columns[0].IsVisible = false;
                        newTemplate.Columns[1].IsVisible = false;
                        parseLogEntryList(listChild, newTemplate, ulong.Parse(strCtr));
                    }
                    if (list.ValueIsString(str))
                    {
                        newTemplate.Rows.Add(parentID, strCtr, str, list.GetString(str));
                        newTemplate.Columns[0].IsVisible = false;
                        newTemplate.Columns[1].IsVisible = false;
                    }
                }
            }
Jack
Telerik team
 answered on 17 Mar 2010
3 answers
597 views

Hello.

When I enable rows creation in RadGridView and click that tells "Click here to add new row" new item is being added to binding source. But then if click somewhere (without entering any text to the cell) this empty row is being added to grid view. How can I change this behavior? I want that new row to be added only after entering some text or pressing "Enter" button.

Thanks.

Martin Vasilev
Telerik team
 answered on 17 Mar 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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?