or
I'm trying to configure the track bar with a threshold value that is greater than the min and less than the max, the user can only go past the threshold value by holding the Control key will dragging the slider. I have tried resetting the value in the Scroll event, that didn’t prevent the slider from continuing or change the value; I reset the value in the ValueChanged event, this did not prevent the slider from continuing but it did reset the value back to the threshold once the mouse was lifted.
I was hoping to have a hard stop at the threshold, is this something that is possible?
Thanks
grid.DataSource = listOfData;
grid.Relations.AddSelfReference(grid.MasterTemplate, "Id", "ParentId"); grid.TableElement.ShowSelfReferenceLines = true;
private
void
radGridView1_ValueChanged(
object
sender, EventArgs e)
{
if
(sender.GetType().ToString() ==
"Telerik.WinControls.UI.GridViewCellInfo"
)
{
//MessageBox.Show(((GridViewCellInfo)sender).ColumnInfo.FieldName);
if
(
bool
.Parse(((GridViewCellInfo)sender).Value.ToString()))
{
foreach
(GridViewRowInfo dr
in
radGridView1.Rows)
{
dr.Cells[0].Value =
true
;
}
}
else
if
(!
bool
.Parse(((GridViewCellInfo)sender).Value.ToString()))
{
foreach
(GridViewRowInfo dr
in
radGridView1.Rows)
{
dr.Cells[0].Value =
false
;
}
}
}
}
Class Toy
{
public Guid Id {get; set;}
public Guid ParentId {get; set;}
public string Name {get; set;}
public int Count {get; set;}
}
ParentToy (id1, null, "Castle", 1)
ChildToy1 (id2, id1, "Knight", 10)
ChildToy2 (id3, id1, "Brick", 100)
radGridView1.GroupDescriptors.Add(
new
GridGroupByExpression(
"Format Group By Format"
));
GridViewSummaryRowItem item1 =
new
GridViewSummaryRowItem();
item1.Add(
new
GridViewSummaryItem(
"pct"
,
"Total: {0:F2} "
, GridAggregateFunction.Sum));
using
System.Windows.Forms;
using
Telerik.WinControls.Enumerations;
using
Telerik.WinControls.UI;
namespace
TestListboxSortAnSelection
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
this
.radListControl1.SelectionMode = SelectionMode.MultiExtended;
this
.radListControl1.SortStyle = SortStyle.Ascending;
this
.radListControl1.Items.Add(
new
RadListDataItem(
"Test 1"
));
this
.radListControl1.Items.Add(
new
RadListDataItem(
"Test 3"
) { Selected =
true
});
this
.radListControl1.Items.Add(
new
RadListDataItem(
"Test 2"
) { Selected =
true
});
}
private
void
radButton1_Click(
object
sender, System.EventArgs e)
{
MessageBox.Show(
string
.Concat(
"Selected items: "
,
this
.radListControl1.SelectedItems.Count));
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent()
{
this
.radListControl1 =
new
Telerik.WinControls.UI.RadListControl();
this
.radButton1 =
new
Telerik.WinControls.UI.RadButton();
((System.ComponentModel.ISupportInitialize)(
this
.radListControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
.radButton1)).BeginInit();
this
.SuspendLayout();
//
// radListControl1
//
this
.radListControl1.CaseSensitiveSort =
true
;
this
.radListControl1.ItemHeight = 18;
this
.radListControl1.Location =
new
System.Drawing.Point(12, 12);
this
.radListControl1.Name =
"radListControl1"
;
this
.radListControl1.Size =
new
System.Drawing.Size(431, 312);
this
.radListControl1.TabIndex = 0;
this
.radListControl1.Text =
"radListControl1"
;
//
// radButton1
//
this
.radButton1.Location =
new
System.Drawing.Point(313, 330);
this
.radButton1.Name =
"radButton1"
;
this
.radButton1.Size =
new
System.Drawing.Size(130, 24);
this
.radButton1.TabIndex = 1;
this
.radButton1.Text =
"radButton1"
;
this
.radButton1.Click +=
new
System.EventHandler(
this
.radButton1_Click);
//
// Form1
//
this
.AutoScaleDimensions =
new
System.Drawing.SizeF(6F, 13F);
this
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this
.ClientSize =
new
System.Drawing.Size(455, 366);
this
.Controls.Add(
this
.radButton1);
this
.Controls.Add(
this
.radListControl1);
this
.Name =
"Form1"
;
this
.Text =
"Form1"
;
((System.ComponentModel.ISupportInitialize)(
this
.radListControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
.radButton1)).EndInit();
this
.ResumeLayout(
false
);
}
private
Telerik.WinControls.UI.RadListControl radListControl1;
private
Telerik.WinControls.UI.RadButton radButton1;
}
}