void grid_CellFormatting(object sender, CellFormattingEventArgs e) |
{ |
if (e.CellElement.Children.Count == 0) |
{ |
var element = new RadComboBoxElement(); |
element.NotifyParentOnMouseInput = true; |
element.DataSource = new List<string>() { "First", "Second", "Third" }; |
e.CellElement.Children.Add(element); |
} |
} |
void Form1_Load(object sender, EventArgs e) |
{ |
var grid = new RadGridView(); |
Controls.Add(grid); |
grid.BeginInit(); |
grid.EndInit(); |
grid.CellFormatting += new CellFormattingEventHandler(grid_CellFormatting); |
grid.MasterGridViewTemplate.AutoGenerateColumns = false; |
grid.Columns.Add(new GridViewDataColumn() { HeaderText = "Header" }); |
grid.DataSource = new List<int> { 1, 2, 3 }; |
} |
Hi, I'm having a problem after upgrading from version 2009 Q3 SP1 to 2010. I´ve run and debbuged your "performance" example and the problem is there too, so I assume that there is a bug in the new version.
The problem arises when I try to get the value (doing this radgridview1.Rows[0].Cells[0].Value) of any cell of the grid, I always get an empty string but it is shown correctly in the screen. It is worth mentioning that i'm using GridViewColumnTexts in my grid.
Tell me if you need more info. Hope to hear about you soon. Regards
Hello,
I have a problem with the isPinned property on the radGrid rows :
I have to pin the first row and the first column of my grid, this works great with the first column (the first column is locked on the left of my grid) but with the first row… the first row is duplicated.
And, of course, edit of the first line don’t work like all others rows of the radGrid (click on the first or the second row edit the first row).
For pin rows and column I use this code (c#) :
if (radGridViewGrille.MasterGridViewTemplate.Rows.Count > 0 )
{radGridViewGrille.MasterGridViewTemplate.Rows[0].IsPinned = true;
}
if (radGridViewGrille.MasterGridViewTemplate.Columns.Count > 0 )
{radGridViewGrille.MasterGridViewTemplate.Columns[0].IsPinned = true;
}
So the question is : How can i remove the duplication of the first row to have the same behavior than the pinned collumn?
Regards.
foreach ( var rowInfo in radGridView1.MasterGridViewTemplate.Rows ) |
{ |
if ( ( !( (bool)rowInfo.Cells[6].Value ) ) ) continue; |
rowInfo.Cells[7].CellElement.Enabled = false; |
} |
radGridView1.Columns[6].IsVisible = false; |