or
POSSGridView.ClearSelection();
POSSGridView.CurrentRow = null;
foreach (GridViewRowInfo rowInfo in POSSGridView.Rows)
{
if (rowInfo.IsSelected)
this.radGridView1.Rows.CollectionChanged += new NotifyCollectionChangedEventHandler(Rows_CollectionChanged);...
private void Rows_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Move)
{
for (int i = 0; i < this.radGridView1.Rows.Count; i++)
{
this.radGridView1.Rows[i].Cells["Priority"].Value = i + 1;
}
}
}
private void rtx_TextChanging(object sender, TextChangingEventArgs e)
{
RadTextBox rtb = sender as RadTextBox;
string title = rtb.Name.Substring(0, rtb.Name.Length - "textbox".Length);
this.radLabelElement1.Text = rgv.CurrentRow.Cells[title].Value.GetType().ToString();
rgv.CurrentRow.Cells[title].Value = e.NewValue;
rgv.CurrentRow.InvalidateRow();
}
DTURradGridView.Columns[
"dtuct0"
].ReadOnly =
true
;
DTURradGridView.Columns[
"dtuct1"
].ReadOnly =
true
;
DTURradGridView.Columns[
"dtuct2"
].ReadOnly =
true
;
DTURradGridView.Columns[
"dtuct3"
].ReadOnly =
true
;
DTURradGridView.Columns[
"dtuy"
].ReadOnly =
true
;
if
(e.CellElement.ColumnInfo
is
GridViewDataColumn)
{
if
(e.CellElement.ColumnInfo.FieldName ==
"dtuct0"
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.NumberOfColors = 1;
e.CellElement.BackColor = Color.LightSlateGray;
e.CellElement.GradientStyle = GradientStyles.Linear;
}
if
(e.CellElement.ColumnInfo.FieldName ==
"dtuct1"
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.NumberOfColors = 1;
e.CellElement.BackColor = Color.LightSlateGray;
e.CellElement.GradientStyle = GradientStyles.Linear;
}
if
(e.CellElement.ColumnInfo.FieldName ==
"dtuct2"
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.NumberOfColors = 1;
e.CellElement.BackColor = Color.LightSlateGray;
e.CellElement.GradientStyle = GradientStyles.Linear;
}
if
(e.CellElement.ColumnInfo.FieldName ==
"dtuct3"
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.NumberOfColors = 1;
e.CellElement.BackColor = Color.LightSlateGray;
e.CellElement.GradientStyle = GradientStyles.Linear;
}
if
(e.CellElement.ColumnInfo.FieldName ==
"dtuy"
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.NumberOfColors = 1;
e.CellElement.BackColor = Color.LightSlateGray;
e.CellElement.GradientStyle = GradientStyles.Linear;
}
}
private
void
normalToolStripMenuItem_Click(
object
sender, EventArgs e)
//Normal View
{
DTURradGridView.Columns[
"dtuct0"
].IsVisible =
false
;
DTURradGridView.Columns[
"dtuct1"
].IsVisible =
false
;
DTURradGridView.Columns[
"dtuct2"
].IsVisible =
false
;
DTURradGridView.Columns[
"dtuct3"
].IsVisible =
false
;
DTURradGridView.Columns[
"dtuy"
].IsVisible =
false
;
}
private
void
advancedToolStripMenuItem_Click(
object
sender, EventArgs e)
//Advanced View
{
DTURradGridView.Columns[
"dtuct0"
].IsVisible =
true
;
DTURradGridView.Columns[
"dtuct1"
].IsVisible =
true
;
DTURradGridView.Columns[
"dtuct2"
].IsVisible =
true
;
DTURradGridView.Columns[
"dtuct3"
].IsVisible =
true
;
DTURradGridView.Columns[
"dtuy"
].IsVisible =
true
;
}