Hi,
I am trying to set the backcolor of the DateTimePicker and TimePicker when disabled. I am already overriding the OnEnabledChanged event to replace the TextBoxElement with our custom text box so I can update the forecolor and this is all working OK and the backcolor of the textbox is correct, however the control border, dropdown arrow, etc. are still using the old color and I am unable to work out what properties I need to update to access these items.
How do i update the backcolor of all of the visible items for the entire DateTimePicker and for a TimePicker?
Thanks,
Mark.
Hi, i'm using the latest Telerik release.
Only on some machines I got this error:
An exception was uncaught System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
at Telerik.WinControls.UI.RadTreeViewElement.SynchronizeNodeElements()
at Telerik.WinControls.UI.RadTreeViewElement.Update(UpdateActions updateAction)
at Telerik.WinControls.UI.RadTreeView.OnGotFocus(EventArgs e)
at System.Windows.Forms.Control.WmSetFocus(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at Telerik.WinControls.UI.RadTreeView.WndProc(Message& m)
Here's my Code, where am I doing something wrong?
//user control Load event
this.Load += new System.EventHandler(this.TreeView_Load);
private
void
TreeView_Load(
object
sender, EventArgs e)
{
radTreeView1.BeginEdit();
PatientEpicrisis epicrisis = MyAdapter.ReadPatientEpicrisis();
var currentNode =
this
.radTreeView1.Nodes[
"EpicrisiNode"
];
currentNode.Nodes.Clear();
if
(!
string
.IsNullOrEmpty(epicrisis.Note))
{
currentNode.Nodes.Add(epicrisis.EpicrisisSynthesis);
var lastNode = currentNode.LastNode;
lastNode.Tag = epicrisis;
lastNode.EndEdit();
}
else
{
currentNode.ContextMenu = radContextMenuEpicrisis;
}
currentNode.EndEdit();
radTreeView1.EndEdit();
}
Hello,
I use a hierarchical grid in my application.
I like to use an Excel like filter for the child rows, but the grid is filled with data by data binding or load on demand so the automatic filter selections are not provided by the grid. (See attached file). Now I like to manually add some filter checkboxes under the "All" checkbox, but I can't figure out how to achieve that.
I know this has to be done in the FilterPopupRequired event......
Thanks for Your help!
Regards
Ingo
My radGridView numerical columns have thousand separator so I have to put a ',' when I search the grid cells using search row. How can I setup the grid so its search cell has thousand separator when I am looking for numerical values?
My numerical columns values are 5 decimal point:
123.12345
123.1234
123.123
123.12
123.1
123
0.123
and so fourth...
Hi,
I recently read that self-referencing hierarchy is now supported by the radGridView. Unfortunately, I have been unable to locate any demos, tutorials, or sample code to look at. Is this information available?
Here is my current code that I'm working with:
private void SetupElementsGrid() |
{ |
radGvElements.Columns.Clear(); |
radGvElements.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("ElementID")); |
radGvElements.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("ProtocolTemplateID")); |
radGvElements.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("ParentElementID")); |
radGvElements.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("ElementNumber")); |
radGvElements.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("ElementDesc")); |
radGvElements.Columns["ElementID"].IsVisible = false; |
radGvElements.Columns["ProtocolTemplateID"].IsVisible = false; |
radGvElements.Columns["ParentElementID"].IsVisible = false; |
radGvElements.Columns["ElementNumber"].HeaderText = "Element Number"; |
radGvElements.Columns["ElementDesc"].HeaderText = "Element Description"; |
radGvElements.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; |
GridViewTemplate childTemplate = new GridViewTemplate(); |
childTemplate.Columns.Add(new GridViewTextBoxColumn("ElementID")); |
childTemplate.Columns.Add(new GridViewTextBoxColumn("ProtocolTemplateID")); |
childTemplate.Columns.Add(new GridViewTextBoxColumn("ParentElementID")); |
childTemplate.Columns.Add(new GridViewTextBoxColumn("ElementNumber")); |
childTemplate.Columns.Add(new GridViewTextBoxColumn("ElementDesc")); |
//childTemplate.Columns["ElementID"].IsVisible = false; |
//childTemplate.Columns["ProtocolTemplateID"].IsVisible = false; |
//childTemplate.Columns["ParentElementID"].IsVisible = false; |
//childTemplate.Columns["ElementNumber"].HeaderText = "Element Number"; |
//childTemplate.Columns["ElementDesc"].HeaderText = "Element Description"; |
childTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; |
if(radGvElements.MasterGridViewTemplate.ChildGridViewTemplates.Count == 0) |
{ |
radGvElements.MasterGridViewTemplate.ChildGridViewTemplates.Add(childTemplate); |
} |
GridViewRelation relation = new GridViewRelation(radGvElements.MasterGridViewTemplate); |
relation.ChildTemplate = childTemplate; |
relation.RelationName = "ParentChild"; |
relation.ParentColumnNames.Add("ElementID"); |
relation.ChildColumnNames.Add("ParentElementID"); |
radGvElements.Relations.Add(relation); |
ProtocolTemplate = (ProtocolTemplate)ProtocolTemplatesBindingSource.CurrencyManager.List[ProtocolTemplatesBindingSource.CurrencyManager.Position]; |
ElementsBindingSource.DataSource = ProtocolTemplate.Elements; |
radGvElements.DataSource = ElementsBindingSource; |
radGvElements.DataSource = ElementsBindingSource; |
childTemplate.DataSource = ElementsBindingSource; |
} |
Sample data would look like this:
ElementID -- ProtocolTemplateID -- ParentElementID -- ElementNumber -- ElementDesc
1 -- 1 -- 1 -- 1.0 -- ParentLevel1
2 -- 1 -- 1 -- 1.1 -- ChildLevel1
3 -- 1 -- 1 -- 1.2 -- ChildLevel2
4 -- 1 -- 4 -- 2.0 -- ParentLevel2
With my current code, this displays as:
Row 1
-- Row1
-- Row2
-- Row3
Row 2
Row 3
Row 4
-- Row 4
It should be:
Row 1
-- Row 2
-- Row 3
Row 4
Also, another problem is with the portion of code I have commented out. This code causes a NullReferenceException error to be thrown and I don't know why.
If anyone could help me out with the above code, or even point me in the direction of some reading material, I would be very grateful.
Thanks,
Robert
I am using a scatter chart now, and trying to allow the user to select multiple points to turn them on or off. Using the selection mode of "MultipleDataPoints" doesn't seem to work for scatter charts the way the "documentation" implies for the pie charts. When I get the "SelectedPointChanged" event, either I don't understand the purpose of the "NewSelectedPoint" and "OldSelectedPoint", or they aren't working. Basically if I have 5 points 1,2,3,4, and 5, if I click on point 2 and then 3 it gives me new point 3 and old point 2. I would expect not to get an old point called out until I "deselect" a point. Otherwise I don't see how to accomplish what the example shows, with two points offset from the center when the multiple points is selected. Rather than banging my head against the wall on this, I used the custom renderer and hit test method on mouse down method that you showed me to fix the multiple pie selection issue, so I have it been able to accomplish what I need but I would still like to know what I am supposed to do in that situation, or if multiple data point selection is just not supported for scatter charts.
My more pressing issue is that I am now trying to use the lasso selection. However I don't want to zoom. I would like to override the behavior to get the lasso but then do my own action on the lasso'd points (the selection I am doing above, actually). I tried inheriting the class but all of the obvious calls that I could override had no effect.
Alternatively, or perhaps in addition to, I would like to know how to determine what points are in the zoomed area once lasso'd. For double bonus, I would like to be able to lasso a circle with the radius emanating from the moused down point (the radius at the mouse up point).
Hi,
I have a dataGrid with a threestate Checkbox-Column. Off = 0, On = 1, Indeterminate = 2.
State Off and On ok, but Indeterminate only the last is show correctly.
After fill the dataGrid On and Indeterminate always the same. I don't know what is wrong.
Database Columns are:
Code varchar(10)
Description varchar(50)
Sort tinyint (0=off,1=on,2=indeterminate)
Fill datagrid:
private bool LoadStreets()
{
bool bOk = true;
try
{
context.Street.Load();
bindingSourceStreet.DataSource = context.Strassen.Local.ToBindingList();
}
catch (DbEntityValidationException ex)
{
bOk = false;
}
return bOk;
}
Please can you tell me what is wrong?
Thank you
Andreas
it is super weird. I spend over 4 hours
my project has very simple data table :
date,quantitysold,AverageQuantity, in datatime, int, int
date will be X
quantitysold, averageQuantity, will be Y1 and Y2
first, user will get the product ID table into gridview and when choosing the product to show the chart,
the radchartview should popup/update the chart based on the product PID
I could make it work when I click the first product ID, erverything is ok, but more I click the datagrid to view the product sales data , the chartview becomes more smaller, please refer to the screenshots
everytime I click the data, I first make series.clear(), and tested area clear(), chart refresh, update.
private void radGridView_197_data_CellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
this.radChartView_197_chart.Series.Clear();
this.radChartView_197_chart.Area.Series.Clear();
this.radChartView_197_chart.Refresh();
this.SetChartViewData();
// if (gridview_197_firstClick)
this.SetupChartView();
....more other code here ,
....
CartesianArea area = this.radChartView_197_chart.GetArea<CartesianArea>();
area.ShowGrid = true;
CartesianGrid grid = area.GetGrid<CartesianGrid>();
grid.DrawHorizontalStripes = true;
...............more code here to update the table which is every time different because product id changed.
this.radChartView_197_chart.DataSource = table;
this.radChartView_197_chart.Update();
this.radChartView_197_chart.Refresh();
}
there is no zoom related setup , I tried almost everything, but there is very limited source online to bind the new data source.
please let me know how to do this.