Telerik Forums
UI for WinForms Forum
5 answers
185 views
I was wondering if it is at all possible to export only the highlighted/selected cells of a grid using this function?
Martin Vasilev
Telerik team
 answered on 10 May 2011
8 answers
142 views
How do you edit templates in a hierarchy view?
KawaUser
Top achievements
Rank 2
 answered on 10 May 2011
5 answers
107 views
Hello!

I have upgraded to v.2011.1.11.419 and got a weird problem with the Property Builder (Visual Studio 2008).

It can be reproduced easily. First, I create a simple form with a RadGridView. The Form1.Designer.cs file is:

namespace Test1
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
  
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
  
        #region Windows Form Designer generated code
  
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).BeginInit();
            this.SuspendLayout();
            // 
            // radGridView1
            // 
            this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radGridView1.Location = new System.Drawing.Point(0, 0);
            this.radGridView1.Name = "radGridView1";
            this.radGridView1.Size = new System.Drawing.Size(284, 264);
            this.radGridView1.TabIndex = 0;
            this.radGridView1.Text = "radGridView1";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 264);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
            this.ResumeLayout(false);
  
        }
  
        #endregion
  
        private Telerik.WinControls.UI.RadGridView radGridView1;
    }
}

Then I open the Designer View and click "Open Property Builder" for a grid. The Property Builder window blinks quickly and the following message box is shown:

---------------------------
Properties Window
---------------------------
Must specify valid information for parsing in the string.
---------------------------
OK
---------------------------

The Form1.Designer.cs file becomes the following:

namespace Test1
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
  
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
  
        #region Windows Form Designer generated code
  
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.MasterTemplate = new Telerik.WinControls.UI.RadGridView();
            ((System.ComponentModel.ISupportInitialize)(this.MasterTemplate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.MasterTemplate.MasterTemplate)).BeginInit();
            this.SuspendLayout();
            // 
            // MasterTemplate
            // 
            this.MasterTemplate.Dock = System.Windows.Forms.DockStyle.Fill;
            this.MasterTemplate.Location = new System.Drawing.Point(0, 0);
            this.MasterTemplate.Name = "MasterTemplate";
            this.MasterTemplate.Size = new System.Drawing.Size(284, 264);
            this.MasterTemplate.TabIndex = 0;
            this.MasterTemplate.Text = "radGridView1";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 264);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.MasterTemplate.MasterTemplate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.MasterTemplate)).EndInit();
            this.ResumeLayout(false);
  
        }
  
        #endregion
  
        private Telerik.WinControls.UI.RadGridView radGridView1;
        private Telerik.WinControls.UI.RadGridView MasterTemplate;
    }
}

I tried to uninstall the RadControls at all and install them from scratch. This did not help.

So, could you please help me with a work around this problem? I use a lot of grids in ny project, so, it would be a pity to miss the Property Builder feature.

Thank you.

Stefan
Telerik team
 answered on 10 May 2011
1 answer
112 views
Hi,
I have a radform with a gridview control.  The "Localizable" property in the RadForm is true and there are only two columns in the gridview. In desgin time, I input the column header text for each column in grid. Then, I change the "Language" in the form and input the Column Header Text in other language.
However, after I switch back language to original, all the column header text I input before were missing. 
Then, I checked the resx files for those two language and found that the "GridViewTextBoxColumn" in those files are different.

The resx file in original language (RadForm1.resx):
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  <data name="RadGridView1.Location" type="System.Drawing.Point, System.Drawing">
    <value>0, 0</value>
  </data>
  <data name="GridViewTextBoxColumn1.HeaderText" xml:space="preserve">
    <value>column 1 in default</value>
  </data>
  <data name="GridViewTextBoxColumn2.HeaderText" xml:space="preserve">
    <value>column 2 in default</value>
  </data>
  <data name="RadGridView1.Size" type="System.Drawing.Size, System.Drawing">
    <value>240, 150</value>
  </data>
  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data name="RadGridView1.TabIndex" type="System.Int32, mscorlib">
    <value>0</value>
  </data>
  <data name="RadGridView1.Text" xml:space="preserve">
    <value>RadGridView1</value>
  </data>
  <data name=">>RadGridView1.Name" xml:space="preserve">
    <value>RadGridView1</value>
  </data>
  <data name=">>RadGridView1.Type" xml:space="preserve">
    <value>Telerik.WinControls.UI.RadGridView, Telerik.WinControls.GridView, Version=2011.1.11.419, Culture=neutral, PublicKeyToken=5bb2a467cbec794e</value>
  </data>
  <data name=">>RadGridView1.Parent" xml:space="preserve">
    <value>$this</value>
  </data>
  <data name=">>RadGridView1.ZOrder" xml:space="preserve">
    <value>0</value>
  </data>
  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </metadata>
  <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
    <value>6, 13</value>
  </data>
  <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
    <value>308, 292</value>
  </data>
  <data name="$this.Text" xml:space="preserve">
    <value>RadForm1</value>
  </data>
  <data name=">>$this.Name" xml:space="preserve">
    <value>RadForm1</value>
  </data>
  <data name=">>$this.Type" xml:space="preserve">
    <value>Telerik.WinControls.UI.RadForm, Telerik.WinControls.UI, Version=2011.1.11.419, Culture=neutral, PublicKeyToken=5bb2a467cbec794e</value>
  </data>
</root>

The resx file in other language (RadForm1.zh-Hant.resx):
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="GridViewTextBoxColumn1.HeaderText" xml:space="preserve">
    <value>column 1 in other language</value>
  </data>
  <data name="GridViewTextBoxColumn2.HeaderText" xml:space="preserve">
    <value>column 2 in other language</value>
  </data>
</root>

Then, I switch the form language back to original language and find that in "RadForm1.zh-Hant.resx" file, the data name for grid column had changed to "GridViewTextBoxColumn3" instead of "GridViewTextBoxColumn1".  So, the column header text can't display in original language.
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="GridViewTextBoxColumn3.HeaderText" xml:space="preserve">
    <value>column 1 in other language</value>
  </data>
  <data name="GridViewTextBoxColumn4.HeaderText" xml:space="preserve">
    <value>column 2 in other language</value>
  </data>
</root>

I would like to know how can I fix it?
Thanks!
Martin Vasilev
Telerik team
 answered on 10 May 2011
2 answers
144 views
Hello,

I've met this morning a special behavior where an exception occurs.

I create a little project for it, and it's really easy to do it again.
(Project here)

Simply launch an instance of this project, click on little "+" to display Childrows and click on "click here to add a new row" in child table

You'll get an null reference exception

Any workaround for letting user adding a childrow?

Regards

Exception :
null reference exception
   at Telerik.WinControls.UI.GridViewNewRowInfo.FillParentData()
   at Telerik.WinControls.UI.GridViewNewRowInfo.InitializeNewRow()
   at Telerik.WinControls.UI.GridViewNewRowInfo.OnBeginEdit()
   at Telerik.WinControls.UI.GridViewEditManager.BeginEdit()
   at Telerik.WinControls.UI.GridRowBehavior.OnMouseUpLeft(MouseEventArgs e)
   at Telerik.WinControls.UI.GridNewRowBehavior.OnMouseUpLeft(MouseEventArgs e)
   at Telerik.WinControls.UI.GridRowBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at TestGridView.Program.Main() dans C:\Users\coudeyre\Projets\TestGridView\TestGridView\Program.cs:ligne 17
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
DenisCL
Top achievements
Rank 1
 answered on 10 May 2011
7 answers
230 views
Is there a sample thta shows how to build a ViewDefinition so that the rows look like the example (DiggDemo) screenshot in the help for WinForms Q1 2011?
Richard Slade
Top achievements
Rank 2
 answered on 10 May 2011
1 answer
99 views
Hi,

I am regular user of rad controls now in my project i want following options in radgrid.

1. I am not able to make textbox multiline  placed inside a grid cell(it should be cell wise as we have different controls in each grid cell) with scroll option. 
2. Can we have multiselect dropdown list in grid cell.

And i am dynamically loading controls in each grid cell @ runtime.

Please suggest me solutions for this.


Jack
Telerik team
 answered on 10 May 2011
3 answers
124 views
Hi Julian,

as requested, here is the code for setting up my Master and Child and populating, unbound data (please let me know if you need more info)

I Really need to be able to access the RowIndex Value

thanks

Regards

Steve

       void CreateUnboundHierarchy()  
        
  
                this.radGridView.MasterTemplate.Reset(); 
                SetupMasterForUnbound();
                GridViewTemplate ChildTemplate = SetupChildForUnbound();
  
                this.radGridView.Templates.Add(ChildTemplate);
                this.radGridView.CreateCell += new GridViewCreateCellEventHandler(radGridView_CreateCell); 
  
  
  
                //--
                ChildTemplate.HierarchyDataProvider = new GridViewEventDataProvider(ChildTemplate);
                //this.radGridView.RowSourceNeeded += new GridViewRowSourceNeededEventHandler(radGridView_RowSourceNeeded);
                this.radGridView.UserAddingRow += new GridViewRowCancelEventHandler(radGridView_UserAddingRow);
                LoadDataForUnbound();
        }
        void SetupMasterForUnbound() 
        {
            this.radGridView.AllowAutoSizeColumns = true; 
            this.radGridView.MasterTemplate.AllowAddNewRow = false;
            this.radGridView.MasterTemplate.AllowDeleteRow = false;
            //-------------
            //--
            GridViewCheckBoxColumn chk1 = new GridViewCheckBoxColumn("SO");
            chk1.HeaderText = "SO";
            chk1.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(chk1);
            //-------------
            //--
            GridViewTextBoxColumn textColumn1 = new GridViewTextBoxColumn("ChargeCode");
            textColumn1.HeaderText = "ChargeCode";
            textColumn1.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(textColumn1);
            //--
            GridViewTextBoxColumn textColumn2 = new GridViewTextBoxColumn("Description");
            textColumn2.HeaderText = "Description";
            textColumn2.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(textColumn2); 
            //--
            GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn("UnitCost");
            decimalColumn.HeaderText = "UnitCost";
            decimalColumn.FormatString = "{0:0.000}";
            decimalColumn.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(decimalColumn);
            //--
            GridViewDecimalColumn decimalColumn1 = new GridViewDecimalColumn("Qty");
            decimalColumn1.HeaderText = "Qty";
            decimalColumn1.FormatString = "{0:0.000}";
            decimalColumn1.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(decimalColumn1);
            //--
            GridViewDecimalColumn decimalColumn3 = new GridViewDecimalColumn("TotalCost");
            decimalColumn3.HeaderText = "TotalCost";
            decimalColumn3.FormatString = "{0:0.000}";
            decimalColumn3.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(decimalColumn3);
            //--
            //--
            GridViewCheckBoxColumn chk2 = new GridViewCheckBoxColumn("Charge");
            chk2.HeaderText = "Charge";
            chk2.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(chk2);
            //--
            GridViewCheckBoxColumn chk3 = new GridViewCheckBoxColumn("Checked");
            chk3.HeaderText = "Checked";
            chk3.ReadOnly = true;
            this.radGridView.MasterTemplate.Columns.Add(chk3);
            //--
            this.radGridView.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            //----------------------------
  
  
        }
        private GridViewTemplate SetupChildForUnbound()
        {
            GridViewTemplate template = new GridViewTemplate(); 
            template.AllowAddNewRow = true;
            template.AllowDeleteRow = false;
            //---------------------------------------------------------------
            //---------------------------------------------------------------
            GridViewTextBoxColumn editButtonColumn = new GridViewTextBoxColumn();
            editButtonColumn.Name = "Edit";
            editButtonColumn.FieldName = "Edit";
            editButtonColumn.ReadOnly = true;
            editButtonColumn.HeaderText = "Edit";
            editButtonColumn.Width = 100;
            template.Columns.Add(editButtonColumn); 
            //-----------------------------------------------------------------
//            template.Columns.Add(new GridViewCheckBoxColumn("SO"));
            GridViewDecimalColumn Num = new GridViewDecimalColumn("Billable");
            Num.HeaderText = "Billable";
            Num.ReadOnly = true;
            Num.IsVisible = false;
            template.Columns.Add(Num);
            //--
            GridViewCheckBoxColumn chk1 = new GridViewCheckBoxColumn("SO");
            chk1.HeaderText = "SO";
            chk1.ReadOnly = true;
            template.Columns.Add(chk1);         
            //--
            GridViewTextBoxColumn textColumn1 = new GridViewTextBoxColumn("ChargeCode");
            textColumn1.HeaderText = "ChargeCode";
            textColumn1.ReadOnly = true;
            template.Columns.Add(textColumn1);
            //--
            GridViewTextBoxColumn textColumn2 = new GridViewTextBoxColumn("Description");
            textColumn2.HeaderText = "Description";
            textColumn2.ReadOnly = true;
            template.Columns.Add(textColumn2);
            //--
            GridViewTextBoxColumn textColumn3 = new GridViewTextBoxColumn("Barcode");
            textColumn3.HeaderText = "Barcode";
            textColumn3.ReadOnly = true;
            template.Columns.Add(textColumn3);
            //--
            GridViewTextBoxColumn textColumn4 = new GridViewTextBoxColumn("Dept");
            textColumn4.HeaderText = "Dept";
            textColumn4.ReadOnly = true;
            template.Columns.Add(textColumn4);
            //--
            GridViewDateTimeColumn Date1 = new GridViewDateTimeColumn("Date");
            Date1.HeaderText = "Date";
            Date1.ReadOnly = true;
            Date1.FormatString = "{0:d}";
            template.Columns.Add(Date1);
            //--            
            GridViewTextBoxColumn textColumn5 = new GridViewTextBoxColumn("Site");
            textColumn5.HeaderText = "Site";
            textColumn5.ReadOnly = true;
            template.Columns.Add(textColumn5);
            //--
            GridViewDecimalColumn decimalColumn1 = new GridViewDecimalColumn("Qty");
            decimalColumn1.HeaderText = "Qty";
            decimalColumn1.FormatString = "{0:0.000}";
            decimalColumn1.ReadOnly = true;
            template.Columns.Add(decimalColumn1);
            //--
            GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn("UnitCost");
            decimalColumn.HeaderText = "UnitCost";
            decimalColumn.FormatString = "{0:0.000}";
            decimalColumn.ReadOnly = true;
            template.Columns.Add(decimalColumn);
            //--
            GridViewDecimalColumn decimalColumn3 = new GridViewDecimalColumn("TotalCost");
            decimalColumn3.HeaderText = "TotalCost";
            decimalColumn3.ReadOnly = true;
            decimalColumn3.FormatString = "{0:0.000}";
            template.Columns.Add(decimalColumn3);
            //--
            GridViewCheckBoxColumn chk2 = new GridViewCheckBoxColumn("Charge");
            chk2.HeaderText = "Charge";
            chk2.ReadOnly = true;
            template.Columns.Add(chk2);
            //--
            GridViewCheckBoxColumn chk3 = new GridViewCheckBoxColumn("Checked");
            chk3.HeaderText = "Checked";
            chk3.ReadOnly = true;
            template.Columns.Add(chk3);
            //--
            template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            return template;
        }
        void LoadDataForUnbound() 
        {
            using (this.radGridView.DeferRefresh())
            {
                for (int i = 0; i < dts_DWBillDataSet.sps_BillableGrouped.Count; i++)
                {
                    dts_DWBillDataSet.sps_BillableGroupedRow row = dts_DWBillDataSet.sps_BillableGrouped[i];
                    this.radGridView.MasterTemplate.Rows.Add(row.SO, row.ChargeCode, row.Description, row.UnitCost, row.Qty, row.TotalCost,row.Charge,row.Checked);
                }
            }
        }
Stephen Breytenbach
Top achievements
Rank 1
 answered on 09 May 2011
13 answers
434 views
Is there a way to make the Rad controls look like normal WinForms controls? I making a business app and don't need the facy styles, but it needs to take on whatever style Windows XP is using, or no styles. One of the problems is that the Telerik styles don't render well in low resolutions, i.e. remoting.
Nikolay
Telerik team
 answered on 09 May 2011
1 answer
55 views
In this version, it looks like when a node goes into edit mode, you are editing the value, rather than the text.  I have a tree bound to a binding list, where the value is an ID, and the display text is a string value.  When the node is edited, the value ID appears, and is the field that is edited.  How can I edit the text, rather than the value?  This worked properly in 2010 Q1, which is the last version I used.  Thanks!
Stefan
Telerik team
 answered on 09 May 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
ProgressBar
CheckedDropDownList
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?