Telerik Forums
UI for WinForms Forum
6 answers
132 views
I have a treeeview and I need to be able to remove a node from it by dragging the node out of the treeview and into a datagrid. I can't figure out how to start the drag and drop actions - what events are fired?

Can anybody help please?

TIA - Jeff.
Stefan
Telerik team
 answered on 22 Mar 2011
2 answers
169 views

Requirements

RadControls version

 

.NET version

 

Visual Studio version

 

programming language

 

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
 I have problems with Rad treeview:
I have a dataset that contains 2 datatables.
First table : Parent_ID , Parent_Text
Second table : Parent_ID, CHild_ID, Child_Text

 

 

DataColumn parentColumn = gl_dsLayerLOBsWIN.Tables["PriceLayerWin"].Columns["Layer"];

 

 

 

DataColumn childColumn = gl_dsLayerLOBsWIN.Tables["PriceLayerLOBWin"].Columns["Layer"];

 

 

 

DataRelation relation = new DataRelation("parent2Child", parentColumn, childColumn);

 

gl_dsLayerLOBsWIN.Tables[

 

"PriceLayerLOBWin"].ParentRelations.Add(relation);

 

radGridView_Layers.DataSource = gl_dsLayerLOBsWIN.Tables[

 

"PriceLayerWin"];

 


radTreeView_Layers.RelationBindings.Add(

 

new RelationBinding("PriceLayerWIN_PriceLayerLOBWIN", gl_dsLayerLOBsWIN));

 

radTreeView_Layers.DataSource = gl_dsLayerLOBsWIN;

 Initially Dataset is empty. When I add a row to Parent datatable and a couple of rows to Child Datatable I see only first level node(s)....  I do not see sublevels.
Could you , please help me with this.
I tried to use Gridview for this purpose also and tried to group it, but I still do not see any data for sublayers .. may be I'm missing something ...

Thank you ,
Victoria.


Stefan
Telerik team
 answered on 22 Mar 2011
4 answers
213 views
I decided that it would be easier to control everything if I built my treeview by hand, one node at a time.  I wanted to suppress checkbox display on all levels of the tree but the lowest level.  However, even though I set ShowCheckBox = false for all levels, it does not suppress the checkboxes at the highest level of the tree.  Otherwise, the tree renders perfectly.  I tried setting tShowCheckBox to false for the lowest level, and that worked.  Is this a bug, and if so, is there a workaround?  Can anyone suggest how to make this work?

Here is the code:

private void BuildTreeFromBindingSourceData()
      {
          this.monitorRadTreeView.Nodes.Clear();
 
          int companyBindingSourcePosition;
          int plantCompanyBindingSourcePosition;
          int equipmentPlantBindingSourcePosition;
 
          RadTreeNode companyNode;
          RadTreeNode plantNode;
          RadTreeNode equipmentNode;
 
          if (companyBindingSource.Count > 0)
          {
              companyBindingSourcePosition = 0;
              while (companyBindingSourcePosition < companyBindingSource.Count)
              {
                  companyBindingSource.Position = companyBindingSourcePosition;
                  companyNode = new RadTreeNode();
                  companyNode.Text = ((MonitorInterfaceDBDataSet.CompanyRow) ((DataRowView)companyBindingSource.Current).Row).Name;
                  companyNode.Tag = ((MonitorInterfaceDBDataSet.CompanyRow)((DataRowView)companyBindingSource.Current).Row).ID;
                  companyNode.ShowCheckBox = false;
 
                  if (plantCompanyBindingSource.Count > 0)
                  {
                      plantCompanyBindingSourcePosition = 0;
                      while (plantCompanyBindingSourcePosition < plantCompanyBindingSource.Count)
                      {
                          plantCompanyBindingSource.Position = plantCompanyBindingSourcePosition;
                          plantNode = new RadTreeNode();
                          plantNode.Text = ((MonitorInterfaceDBDataSet.PlantRow)((DataRowView)plantCompanyBindingSource.Current).Row).Name;
                          plantNode.Tag = ((MonitorInterfaceDBDataSet.PlantRow)((DataRowView)plantCompanyBindingSource.Current).Row).ID;
                          plantNode.ShowCheckBox = false;
 
                          if (equipmentPlantBindingSource.Count > 0)
                          {
                              equipmentPlantBindingSourcePosition = 0;
                              while (equipmentPlantBindingSourcePosition < equipmentPlantBindingSource.Count)
                              {
                                  equipmentPlantBindingSource.Position = equipmentPlantBindingSourcePosition;
                                  equipmentNode = new RadTreeNode();
                                  equipmentNode.Text = ((MonitorInterfaceDBDataSet.EquipmentRow)((DataRowView)equipmentPlantBindingSource.Current).Row).Name;
                                  equipmentNode.Tag = ((MonitorInterfaceDBDataSet.EquipmentRow)((DataRowView)equipmentPlantBindingSource.Current).Row).ID;
                                  equipmentNode.ShowCheckBox = true;
                                  plantNode.Nodes.Add(equipmentNode);
                                  equipmentPlantBindingSourcePosition++;
                              }
                          }
                          companyNode.Nodes.Add(plantNode);
                          plantCompanyBindingSourcePosition++;
                      }
                  }
                  this.monitorRadTreeView.Nodes.Add(companyNode);
                  companyBindingSourcePosition++;
              }
          }
      }


The binding sources, if you need to see them, look like:

           
companyBindingSource = new BindingSource();
companyBindingSource.DataSource = monitorInterfaceDBDataSet;
companyBindingSource.DataMember = "Company";
 
plantCompanyBindingSource = new BindingSource();
plantCompanyBindingSource.DataSource = companyBindingSource;
plantCompanyBindingSource.DataMember = "FK_Plant_Company";
 
equipmentPlantBindingSource = new BindingSource();
equipmentPlantBindingSource.DataSource = plantCompanyBindingSource;
equipmentPlantBindingSource.DataMember = "FK_Equipment_Plant";

Stefan
Telerik team
 answered on 22 Mar 2011
5 answers
628 views
Team,

can i format a tree view text like

my tree view node is like
---My String (1234)

so please tell me can i bold this 1234 if yes then please suggest How ?
Stefan
Telerik team
 answered on 22 Mar 2011
3 answers
166 views
Q1 2009 SP1 Winform RadTreeView

Why is it that 'node.Checked' doesn't seem to get evaluated when TriStateMode is False?

If TriStateMode is True 'node.Checked' gets evaluated as expected.

I'm trying to uncheck all checkboxes in my RadTreeView without using TriStateMode. Is there another approach I should be using (without using TriStateMode)?

Thanks,
Matt
Stefan
Telerik team
 answered on 22 Mar 2011
2 answers
91 views
Hello,
I've created a radTreeView, i added the dataSource and the relationBindings.
But when i execute the application the treeView don't appear in my interface.
What do you think?

Thanks in advance
Stefan
Telerik team
 answered on 22 Mar 2011
2 answers
143 views
Hi,
I'm trying to theme the RadTreeView to change the colours of the checkboxes.  Currently, the tri-state checkbox turns red when in the indeterminate state.  This is quite unusual as it is different to every other tri-state checkbox style out there, and the red draws unnecessary attention.
However it seems that whatever values I set for MiddleStateCheckColor and NormalStateCheckColor are ignored.  Has anyone else successfully changed the indeterminate tri-state checkbox colour?
Stefan
Telerik team
 answered on 22 Mar 2011
8 answers
386 views

Hello

I am attempting to bind 3 tables of data to a Treeview using lists:

 

 

 

 

 
            vwMarketTypex mtype = markettypecontroller.GetView(STR_MarketType, STR_TimePeriod);  
            List<Symbol> currencies = Symbolcontroller.GetSymbolsByMarketType(mtype.MarketTypeID);  
 
            List<Scenario> scenarios = senariocontroller.GetAllScenarios();  
            List<RZEROMarketData.Data.RuleSet> rulesetsx = rscontroller.GetAllRulesets();  
 
            radTreeView1.RootRelationDisplayName = "Curreny Pair";  
            
            var newRelationBinding = new RelationBinding("Scenarios", scenarios, null"ScenarioDescription""ScenarioId");  
     
            radTreeView1.RelationBindings.Add(newRelationBinding);  
      
            var newRelationBinding1 = new RelationBinding("Rulesets", rulesetsx, null"Name""RulesetId");  
            radTreeView1.RelationBindings.Add(newRelationBinding1);  
         
 
            radTreeView1.DataSource = currencies; 



The last object rulesetsx does not bind ..please can you advise if I am on the right track.

Thanks

 

 

 

 

 

Stefan
Telerik team
 answered on 22 Mar 2011
2 answers
372 views
I was wondering if it's possible to use a TreeView as the drop-down of a combo box in win forms like you can in ASP.NET?
Stefan
Telerik team
 answered on 22 Mar 2011
4 answers
193 views
Hello,

i downloaded a trial version of your winforms 2009 / 2 for my future project and i am trying to understand this type of your product (i have experience with ASP.NET Controls)

But here I am not able to bind anything. I will need a treeview generated from database but when i am binding treeview step by step from your manual at http://www.telerik.com/help/winforms/tree_datadatabase.html and from your music collection database i have still empty form. At Visual Studio is everything fine - no errors or warnings, but when i debug that i have empty form. The same problem is with RadGrid, just columns name and no data. Display name i have defined. I really dont know what to do, bcs i tried everything what i know. I have Windows 7, VS 2005 SP1, .NET framework 3.5.

Thx for any help, i did not use C# so much.
Stefan
Telerik team
 answered on 22 Mar 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?