Telerik Forums
UI for WinForms Forum
9 answers
379 views

Hi,

I want to know how to implement a parent-child scenario in a GridView. I have a datasource which contains the "parent" rows, and for each parent row, I want to be able to "expand" and see another gridview which contains the child rows.

Parent and child tables do not have the same columns, and my datasource is a collection of objects.

Couldnt' find an example of this in the included samples.

Regards,
Phi Le

Vassil Petev
Telerik team
 answered on 06 Jul 2007
3 answers
169 views
Can values be loaded into the Tag property of a tree's nodes during databinding?  Obviously I can get the DisplayMember, Id, and ParentId, but I'm not having any success with Tag.
Jordan
Telerik team
 answered on 06 Jul 2007
1 answer
201 views

Hello again,

My datasource is a collection of objects, with sub-objects. The databinding is OK, but when I click the row header to perform sorting, an exception is raised.

The following code is the same as the one in the Telerik examples under RadGridView->DataBinding (select sub-object datasource)

ArrayList list = new ArrayList();  
 
list.Add(new MyObj("1"));  
list.Add(new MyObj("2"));  
list.Add(new MyObj("3"));  
list.Add(new MyObj("4"));  
list.Add(new MyObj("1"));  
 
radGridView1.GridElement.BeginUpdate();  
 
radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Inner1.TestProp"));  
radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Inner1.Inner2.TestProp"));  
radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Inner1.Inner2.Inner1.TestProp"));  
radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("TestProp"));  
 
radGridView1.GridElement.EndUpdate(false);  
 
radGridView1.DataSource = list;  
 

and the MyObj object is defined as:

public class MyObj  
{  
    public string _innerText = "";  
 
    public MyObj() {}  
 
    public MyObj(string text)  
    {  
        _innerText = text;  
    }  
 
    public MyObj Inner1  
    {  
        get  
        {  
            return new MyObj(this._innerText + "Inner1");  
        }  
    }  
 
    public MyObj Inner2  
    {  
        get  
        {  
            return new MyObj(this._innerText + "Inner2");  
        }  
    }  
 
    public string TestProp  
    {  
        get  
        {  
            return this._innerText;  
        }  
    }  

I notice the following:

When I try to sort any column bound to a sub-object (ie. any of the first 3 columns), I get one of the following errors:
"Cannot find the column Inner1.TestProp"
"Cannot find the column Inner1.Inner2.TestProp"
"Cannot find the column Inner1.Inner2.Inner1.TestProp"

The final column sorts OK.

I also noticed that when I run this demo from within Telerik examples, I don't get an exception, but the sorting doesn't work properly for the first 3 columns.

Cheers
Phi

Julian Benkov
Telerik team
 answered on 06 Jul 2007
1 answer
1.0K+ views
It possible to made winform round button, and maybe whit image inside?
Dwight
Telerik team
 answered on 06 Jul 2007
1 answer
229 views

Hello again,

How do I programatically apply a filter to a RadGridView?

Basically, I want to hide the "Filtering Row" and apply filters on multiple columns but from within code.


Cheers
Phi

Dwight
Telerik team
 answered on 06 Jul 2007
5 answers
303 views
Someone has probably already reported this one, but the Scroll event does not seem to be getting fired.

Best regards

Marek
Boyko Markov
Telerik team
 answered on 06 Jul 2007
5 answers
652 views

Hi,

I have a DateTime column on a RadGridView. How do I set formatting for that column?
I have tried adding GridViewDataColumn and GridViewDateTimeColumn to the MasterGridViewTemplate, then seting the DataTextFormatString property of the column to "{0:dd/MMM/yyyy}";
but that doesn't work.

Currently I am doing a work-around, where I subscribe to the OnGridViewCellFormatting event, detect if it's a date value and re-format it there, but this solution isn't really ideal.

Please advise!

Regards,
Phi Le

Peter
Telerik team
 answered on 05 Jul 2007
3 answers
124 views
We're using RadTitleBar and wish to prevent the application from maximizing.
Normally overriding DefWndProc works just fine but not in this case.
Any suggestions?
Jordan
Telerik team
 answered on 04 Jul 2007
3 answers
202 views

Hi,

I want to know how to use the GetNodeByKey() method.
It doesn't appear to work, so can you tell me if I'm missing something.

Here is the code I use:

RadTreeNode node = new RadTreeNode("node1");
node.Key = 1;
this.radTreeView1.Nodes.Add(node);

node = new RadTreeNode("node2");
node.Key = 2;
this.radTreeView1.Nodes.Add(node);


// Won't be able to find the node with key = 2, messagebox will appear
RadTreeNode selected = this.radTreeView1.GetNodeByKey(2);
if (selected == null)
 MessageBox.Show("couldnt find selected node with key=2 using GetNodeByKey()");

// this should find it ok.
foreach (RadTreeNode radNode in this.radTreeView1.Nodes)
{
 if (Convert.ToInt32(radNode.Key) == 2)
  MessageBox.Show("Found node with key = 2");
}

Regards,
Phi Le

Boyko Markov
Telerik team
 answered on 04 Jul 2007
2 answers
91 views

Hi,

Create an empty form. Place a RadTabStrip there, and add a new tab. Place a RadComboBox within the newly added tab.
Close the form window, and then re-open it. You will notice that the designer code changes (there is an asterisk indicating the file has changed).

When I look at the designer generated code, I notice that the following line is added
Me.RadComboBox.FormatString = Nothing

If I save, close the form window and re-open, the designer code changes again and the previous line is no longer there. Everytime I close and re-open the form, that line appears and re-appears.

It doesnt make a difference to to the functionality but its annoying that the designer code always changes even if I havent touched the form.
I also notice that there's a slight pause, everytime I re-open the form, it seems to be regenerating the designer code. Does this happen with all forms & controls, or is it a behaviour of the VS2005 designer or is it unique to the Telerik controls?

Regards,
Phi Le

Phi
Top achievements
Rank 1
 answered on 03 Jul 2007
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?