Hello,
I need to set the fill primitive of a control programatically. Attached is a picture of what I need to accomplish.
From the tree on the left (of the attached image) you can see I'm setting DockLayoutPanel.ToolwindowCaptionElement.FillPrimitive to the color red. Works great from within the designer, but I need to do it via program control.
It seems like this control, which is in a raddock, is part of a tool tab strip so I've tried...
toolTabStrip11.SplitPanelElement.Fill.BackColor = Color.Red;
toolTabStrip11.SplitPanelElement.ForeColor = Color.Red;
and several other variations, but none of them changed the color. Is there a way to do this grammatically?
Thanks to anyone who can solve this,
Steve

Hi,
I am facing an exception when using excel-like filtering in RadGridView and use "Null" and some other value for filtering. The details is given below.
My system information,
Steps to reproduce the exception
Item has already been added. Key in dictionary: 'value 1' Key being added: 'value 1'at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at Telerik.WinControls.UI.FilterMenuTreeElement.UpdateNodeSelectionOnCheckedChanged(RadTreeNode node) at Telerik.WinControls.UI.FilterMenuTreeElement.treeView_NodeCheckedChanged(Object sender, RadTreeViewEventArgs e) at Telerik.WinControls.UI.RadTreeViewElement.OnNodeCheckedChanged(TreeNodeCheckedEventArgs e) at Telerik.WinControls.UI.RadTreeNode.OnCheckStateChanged() at Telerik.WinControls.UI.RadTreeNode.set_CheckState(ToggleState value) at Telerik.WinControls.UI.TreeNodeElement.ToggleElement_ToggleStateChanging(Object sender, StateChangingEventArgs args) at Telerik.WinControls.UI.RadToggleButtonElement.OnToggleStateChanging(StateChangingEventArgs e) at Telerik.WinControls.UI.TreeNodeCheckBoxElement.OnToggleStateChanging(StateChangingEventArgs e) at Telerik.WinControls.UI.RadToggleButtonElement.SetToggleStateCore(ToggleState value) at Telerik.WinControls.UI.RadToggleButtonElement.SetToggleState(ToggleState value) at Telerik.WinControls.UI.TreeNodeCheckBoxElement.OnToggle() at Telerik.WinControls.UI.RadToggleButtonElement.OnClick(EventArgs e) at Telerik.WinControls.RadElement.DoClick(EventArgs e) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e) at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e) at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e) at Telerik.WinControls.UI.RadTreeView.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 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) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Telerik_GridView_Test.Program.Main() in d:\Projects\Zitter\Test Projects\Telerik GridView Test\Telerik GridView Test\Program.cs:line 17 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Looking forward to a quick solution for this.
Thanks and Regards

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

