Telerik Forums
UI for WinForms Forum
8 answers
321 views
Hello,

I am trying to create a RadGridView which have multiple GridViewTemplates as hierarchical data. It works for my first relation using ParentColumnNames and ChildColumnNames, however, when adding my second relation, it does not work.

A small attached code sample is here, thanks:
    public class Client 
    { 
        public int ID { getset; } 
        public string Name { getset; } 
 
        public Client(int id, string name) 
        { 
            ID = id; 
            Name = name; 
        } 
    } 
 
    public class Order 
    { 
        public int ID { getset; } 
        public int ClientID { getset; } 
        public int Quantity { getset; } 
 
        public Order(int id, int clientid, int quantity) 
        { 
            ID = id; 
            ClientID = clientid; 
            Quantity = quantity; 
        } 
    } 
 
    public class OrderPrices 
    { 
        public int ID { getset; } 
        public int ClientID { getset; } 
        public double Price { getset; } 
 
        public OrderPrices(int id, int clientid, double price) 
        { 
            ID = id; 
            ClientID = clientid; 
            Price = price; 
        } 
    } 
 
        private void Form1_Load(object sender, EventArgs e) 
        { 
            radGridView1.AutoGenerateHierarchyFromDataSet = false
 
            ordersTemplate = new GridViewTemplate(this.radGridView1); 
            radGridView1.MasterGridViewTemplate.ChildGridViewTemplates.Add(ordersTemplate); 
 
            GridViewRelation relation1 = new GridViewRelation(this.radGridView1.MasterGridViewTemplate); 
            relation1.RelationName = "Clients Orders1"
            relation1.ParentColumnNames.Add("ID"); 
            relation1.ChildColumnNames.Add("ClientID"); 
 
            relation1.ChildTemplate = ordersTemplate; 
            radGridView1.Relations.Add(relation1); 
 
            orderPricesTemplate = new GridViewTemplate(radGridView1); 
            radGridView1.MasterGridViewTemplate.ChildGridViewTemplates.Add(orderPricesTemplate); 
 
            GridViewRelation relation2 = new GridViewRelation(radGridView1.MasterGridViewTemplate); 
            relation2.RelationName = "Clients Order Prices"
            relation2.ParentColumnNames.Add("ID"); 
            relation2.ChildColumnNames.Add("ClientID"); 
 
            relation2.ChildTemplate = orderPricesTemplate; 
            radGridView1.Relations.Add(relation2); 
 
            LoadData(); 
        } 
 
        private void LoadData() 
        { 
            BindingList<Client> clients = new BindingList<Client> 
                  { 
                      new Client(1, "John Smith"), 
                      new Client(2, "Peter Jackson"), 
                      new Client(3, "Samuel Dell"), 
                      new Client(4, "Test"
                  }; 
 
            BindingList<Order> orders = new BindingList<Order> 
                { 
                    new Order(1, 1, 2), 
                    new Order(1, 1, 1), 
                    new Order(1, 2, 10), 
                    new Order(1, 3, 43) 
                }; 
 
            BindingList<OrderPrices> orderprices = new BindingList<OrderPrices> 
               { 
                   new OrderPrices(1, 4, 1.50), 
                   new OrderPrices(1, 4, 9.99), 
                   new OrderPrices(1, 1, 10.11), 
                   new OrderPrices(1, 2, 43.42) 
               }; 
 
 
            orderPricesTemplate.DataSource = orderprices; 
            ordersTemplate.DataSource = orders; 
 
            radGridView1.DataSource = clients; 
        } 

Nikolay
Telerik team
 answered on 28 Aug 2008
1 answer
167 views
Q2 2008 SP1 requires a manual deinstallation of Q2 2008.
Are you aware of this?

Regards
Martin
Jordan
Telerik team
 answered on 28 Aug 2008
1 answer
240 views
Greetings,
Is there a way to increase or decrease the animation speed of the form carousel?

Also, is there any way to import a form to use as a control?  I'd like to mimic the Windows Runline, for instance, as a selection in the Carousel.

Thanks!

Jim
Mike
Telerik team
 answered on 27 Aug 2008
1 answer
191 views
Hello Team,

    I am using radgridview for databinding, and its a hierarchical grid.
    If i have chils rows, then only i can add new row for child grid.
    Can it be able to add new child row if there are no rows present in child grid?
    If so how?
    Please let me know abt this.

thanks & regards,
Narendra P
erwin
Top achievements
Rank 1
Veteran
Iron
 answered on 27 Aug 2008
1 answer
175 views
I would like to know how to change default behavior of RadCalendar control. In particolar I need to :
- change a color of a single day
- associate a little images to a single day

Regards
Stefano Milanesi

Nikolay
Telerik team
 answered on 27 Aug 2008
1 answer
179 views
Hey,
     Is there anyway that I can show the Conditional formatting dialog programmatically by a button click?
I mean to use something just like the function that shows the column chooser
RadGridView.ShowColumnChooser() function
Thanks
Nikolay
Telerik team
 answered on 26 Aug 2008
2 answers
208 views
Is there a means to disable the Month/Year selector?

Thanks,
  Chris
Nikolay
Telerik team
 answered on 26 Aug 2008
2 answers
155 views
Hi,

I get this error when trying to display gridview with lookup column. Any clue where's the problem?

http://mf.ederon.net/telerik/gridviewlookup.png

Column bound to lookup is called ContactRoleID, ValueMember is Id and DisplayMember is Description. ContactRoleID of grid datasource is same type as Id from the lookup list (string).

Thanks for any help.

Regards,
Daniel
Dimitar Kapitanov
Telerik team
 answered on 25 Aug 2008
4 answers
153 views
Hello,

Is it possible to add a column to a radgridview, that corresponds to a another specific column value?
 
For instance, if a value in column A is greater than 10, in column B, I want to show an exclamation point or an image that corresponds to that condition. I want to create a grid like the outlook messages list (using exclamation points, envelops, etc.)

I'm using the conditional formating but, as long as I know, I can only apply row/cell color formating.

Thank You.
LM

Nikolay
Telerik team
 answered on 25 Aug 2008
1 answer
83 views
How can I avoid showing "+" symbols for nodes that do not have children ?
Jordan
Telerik team
 answered on 25 Aug 2008
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?