{
try
{
if (sender is RadGridView)
{
RadGridView grid = (RadGridView)sender;
if (grid.CurrentCell.ColumnIndex == (int)enum_grid_sleeve.picked)
{
int picked = Convert.ToInt32(grid.ActiveEditor.Value);
int available = Convert.ToInt32(grid.CurrentRow.Cells[(int)enum_grid_sleeve.paqavailable].Value);
int required = Convert.ToInt32(grid.CurrentRow.Cells[(int)enum_grid_sleeve.paq].Value);
if (available < picked) { e.Cancel = true; MessageBox.Show("Picking more than available."); }
else if (required < picked) {e.Cancel = true; MessageBox.Show("Picking more than required."); }
}
}
}
catch { }
}
// Resetting color |
node.BackColor = Color.FromArgb(0, 0, 0, 0); |
node.BackColor2 = Color.FromArgb(0, 0, 0, 0); |
// Setting custom background |
node.BackColor = Color.FromArgb(0xEA, 0xF3, 0xFB); |
node.BackColor2 = Color.FromArgb(0x1E, 0x77, 0xD3); |
public void CreateGridProductieMonitor(List<string> Kolommen)
{
radGridViewProductie.DataSource = schrapViewBindingSource;
foreach (string Kol in Kolommen)
{
if (!string.IsNullOrEmpty(Kol.Trim()))
{
GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn();
textBoxColumn.UniqueName = Kol;
textBoxColumn.HeaderText = Kol;
textBoxColumn.FieldName = Kol;
radGridViewProductie.MasterGridViewTemplate.Columns.Add(textBoxColumn);
}
}
}
The datasource of the grid is a generic list. The fieldname is 100% correct.
Only the first column shows data. The other columns are empty. When i change the order of the columns the result is the same. The first column added shows data.
I tried adding the columns before and after binding to the datasource.
Greetings Tim
this.radRibbonBar1.RibbonBarElement.QuickAccessToolBar.OverflowButtonElement.DropDownMenu.Items.Add(new RadMenuItem("testing")); |