Bugzilla – Attachment 270515 Details for
Bug 472968
DataGridViewRowCollection.Insert is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
Example.
dgrid.cs (text/plain), 1.62 KB, created by
Mario Carrion
on 2009-02-05 17:40:29 UTC
(
hide
)
Description:
Example.
Filename:
MIME Type:
Creator:
Mario Carrion
Created:
2009-02-05 17:40:29 UTC
Size:
1.62 KB
patch
obsolete
>using System; >using System.Collections.Generic; >using System.Linq; >using System.Windows.Forms; >using System.Drawing; > >namespace DataGrid >{ > static class Program > { > [STAThread] > static void Main() > { > Application.EnableVisualStyles(); > Application.SetCompatibleTextRenderingDefault(false); > Application.Run(new ExampleForm()); > } > > public class ExampleForm : Form > { > public ExampleForm() > : base() > { > Size = new Size(600, 300); > > DataGridView view = new DataGridView(); > view.Size = new Size(400, 200); > view.AllowUserToAddRows = false; > view.Location = new Point(20, 20); > > DataGridViewTextBoxColumn textColumn = new DataGridViewTextBoxColumn(); > textColumn.HeaderText = "text column"; > view.Columns.Add(textColumn); > > Button button = new Button(); > button.Text = "Add row"; > button.Size = new Size(100, 25); > button.Location = new Point(450, 10); > button.Click += delegate(object sender, EventArgs args) > { > DataGridViewRow row = new DataGridViewRow (); > DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell(); > cell.Value = view.Rows.Count; > row.Cells.Add (cell); > view.Rows.Insert (0, row); > }; > > Controls.Add(view); > Controls.Add(button); > } > > } > } >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 472968
: 270515 |
270516
|
270519
|
270532
|
270536
|
270550