Telerik Forums
UI for WinForms Forum
1 answer
244 views
Hi!

After a quick search I discovered that many-to-many relationships aren't supported in the GridView (using data binding). But, I still need to display such data, and wonder what your recomendations are to accomplish this.

Scenario:
Two classes:
- Concert
- City

The City can host zero or many Concerts, and a Concert man be held in zero or many cities. Class definitions below:
        class Concert  
        {  
            string Name;  
            List<City> Cities;  
        }  
 
        class City  
        {  
            string Name;  
            List<Concert> Concerts;  
        } 


I load the all the Cities into a separate List<City>, and all Concerts into another List<Concert> and via another method I resolve the many-to-many relationships:
        void LoadData()  
        {  
            List<City> AllCities = LoadAllCities(); // Load data from database  
            List<Concert> AllConcerts = LoadAllConcerts(); // Load data from database  
            ResolveRelationships(AllCities, AllConcerts); // Resolve many-to-many relationship  
 
        } 
I have only created ONE object instance per City and ONE object instance per Concert. The ResolveRelationships method just reads a relation-table and populates the City.Concerts and Concert.Cities collections. The City.Concerts and Concert.Cities collections just contain references to the objects originally loaded into AllCities and AllConcerts.

Now I want to display this into a grid. The MasterGridView can contain the Concerts and the ChildGridView can contain the Cities (or vice versa).

What are your recomendations on how to accomplish this? Manually create the grid or use some kind of object datasource?

Thanks in advance,
Johan



Martin Vasilev
Telerik team
 answered on 05 Feb 2010
2 answers
1.0K+ views
Hello
I have an  issue with my radgridview
Whenever i try to add 'n' no of items in a radgridview.. the scrollbar appears automatically.... which is desirable
I now delete all the items in the radgridview.. but the scrollbar is still visible... Is there any way i can force my scrollbars to hide ??

Regards
Srivatsa
Martin Vasilev
Telerik team
 answered on 05 Feb 2010
1 answer
167 views
Hi,

I am using a datagrid in which all editable columns are shown in a different color which i am doing on cell formatting , however when data is entered in cells which is invalid i want to change the back color to Red .
 
Here i want to make sure that user is taken back to cell in which he was doing editing also when the value he has enetred is correct the back color should change back to editable back color.

Also can't we show errortext in cell directly rather then showing it on grid.

Thanks
Anuj
Martin Vasilev
Telerik team
 answered on 05 Feb 2010
6 answers
308 views
Hello

I have a docking manager with 2 panels. one fixed and one auto hide.
When the auto hide panel is activated I want it to open the full width of the docking manager but at the moment it only opens a 1/4 (ish) the way.
I have tried setting the "minimumsize" and the "minsize"  and the "size" attribute but none of them seem to make any difference, although I cannot find any documentation on the "minsize" attrib.

Is it possible to do this?

Thanks

Bex
Nikolay
Telerik team
 answered on 05 Feb 2010
4 answers
316 views
Hello,
I am searching to reproduce the outlook pane style in my application. In the radcontrols for winforms I found the panelbar which can be used as outlook bar when the group style is set to OutlookNavPane. It's almost like the official outlook bar.
But I didn't see the button wich allows to collapse the panelbar to a minimal state (icons still visible on the left...)

Can you tell me please If the PanelBar control allows that ? I absolutely need this functionnality..

Thank you
frederic szymczak
Top achievements
Rank 1
 answered on 04 Feb 2010
0 answers
133 views
' Comunicação com a Camada BLL 
 
        Dim obj As New EspecialidadesBLL 
 
        especialidadesDataGridView.DataSource = obj.Listagem() 
 
 
 
        ' Atualizando os objetos TextBox 
 
        idesp.Text = especialidadesDataGridView(0, especialidadesDataGridView.CurrentRow.Index).Value.ToString() 
 
        TextBox16.Text = especialidadesDataGridView(1, especialidadesDataGridView.CurrentRow.Index).Value.ToString() 
 
        TextBox6.Text = especialidadesDataGridView(2, especialidadesDataGridView.CurrentRow.Index).Value.ToString() 


hi all

now i'm using telerik winform Q3 2009

in this code above, i dont have any error when using datagridview, but when i want to use radgridview i get this error:


Error 1:    Class 'Telerik.WinControls.UI.RadGridView' cannot be indexed because it has no default property. 

 Error 2:    'Index' is not a member of 'Telerik.WinControls.UI.GridViewRowInfo'.   

how can i solve this error????????????


rizu mussa
Top achievements
Rank 1
 asked on 04 Feb 2010
5 answers
680 views
Hey folks,

I figure if there is any way to hide repeated cell values in my grid. I attached a screenshot and want to hide the redundant information in the first 3 columns. I am wondering if there might be an intelligent way of doing with the grid control.

Has anybody of you guys a cool idea to me?

I attached a screenshot which shows my actual grid and a grid which looks like it should be.
At this moment I do not have any idea except of iterating thorugh the rows. Additonally the difficulty is that this is a hierachy grid which is bound to the childtemplate by the first thre rows. So the best way should be formatting the cells with the fore color white, right?

Any thought?! ;)

Thanks in advance.

Best

Svett
Telerik team
 answered on 04 Feb 2010
1 answer
1.1K+ views
Hi,

I have hierarchical RadGridView where MasterGridViewTemplate.AutoExpandGroups is set to False. Code for binding is like this.
PatientGridView.DataSource = currentPatientList
GridGroupByExpression patientExpression = new GridGroupByExpression(); 
patientExpression.Expression = "FullName as FullName format \"{1}\" Group By OrderID"; 
PatientGridView.MasterGridViewTemplate.GroupByExpressions.Add(patientExpression); 

After binding I want to programatically expand some groups by certain condition. I have tried with following code but it doesn't work:

            foreach (GridViewRowInfo row in PatientGridView.Rows) { 
                if (someCondition == true) { 
                    row.IsExpanded = true
                    row.IsSelected = true
                    PatientGridView.GridNavigator.SelectRow(row); 
                } 
            } 


Can you advise how to programmatically expand specific group in RadGridView where all groups are collapsed by default?

Regards,
Tomislav
Nikolay
Telerik team
 answered on 04 Feb 2010
5 answers
421 views
hi
iam trying to add some rows in code
the firsr row is added alone then ina loop all other rows are added
but the grid acts in very stupid way that its added the firts row and adds all other row on top of it
i have chnaged the way the new row added to buttom and also tried the top but nothing works
can u plz help couse iam very unhappy using this grid and if some more problems appears i will throw it away
Nick
Telerik team
 answered on 04 Feb 2010
4 answers
252 views
I've migrated a winform project to the 2009.3.9.1203 version of your controls and I have several issues:

- I can't open a form in VS designer, it says:
 System.InvalidCastException: Unable to cast object of type 'Telerik.Charting.Styles.Unit' to type 'Telerik.Charting.Styles.Unit'.
The error occurs with these lines:

chartMarginsTitle1.Bottom = ((Telerik.Charting.Styles.

Unit)(resources.GetObject("chartMarginsTitle1.Bottom")));

 


- my RadGrids lose their Size property, their width takes big big values, and I need to reset them manually....
Nick
Telerik team
 answered on 04 Feb 2010
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
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
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?