Telerik Forums
UI for WinForms Forum
1 answer
200 views
Hi All,

In our WinForms application we have some hierarchival gridviews (we call them master-detail grid). This week we upgraded to the new 2010.3 10.1109 version, the last version was the 2010.2 10.914, and the application worked fine with the older verion.

But, now:
In the UserAddedRow event the e.Row.Hierarchilevel is 1 always, and not 0 in the case of new master rows.

In the UserDeletedRow event the e.Row.DataBoundItem is null, so, e.g.: e.Row.DataBoundItem.GetType().Name throws a NullReferenceException.

Any idea?


Best regards,

Peter Szintai
Richard Slade
Top achievements
Rank 2
 answered on 17 Nov 2010
13 answers
467 views
I have a situation where I want to create a treeview that has 4 levels.  I want to immediately load the first two levels, and only load levels 3 and 4 for a particular level 2 node when it is expanded.  I would like all of these nodes to be bound to a datatable(s) for ease of updating the data.  What would be the best way to accomplish this?  I am experimenting with both related tables in a hierarchy, and a self-referencing table, but haven't seen the exact results I am looking for.  Thanks for your help!
Sonya L
Top achievements
Rank 1
 answered on 17 Nov 2010
4 answers
358 views
Hello,

I just wanted to share this in case anyone else had the same issue.

Scenario
+ RadGridView bound to datasource.
+ Multiselect enabled

Pre Q3 2010 you were able to loop over the rows and set each SelectedRow IsVisible property to False as below
Private Sub RadButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.Click
    Try
        Me.Cursor = Cursors.WaitCursor
        For Each row As GridViewRowInfo In Me.RadGridView1.SelectedRows
            row.IsVisible = False
        Next
    Finally
        Me.Cursor = Cursors.Default
    End Try
End Sub

Post Q3, you can only do this if you have only 1 row selected. With multiple rows selected the RadGridView throws an InvalidOperationException (collection was modified) exception.

In order to get over this, one needs to use the BeginUpdate / EndUpdate methods of RadGridView.

The modified code is below:

Private Sub RadButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.Click
    Try
        Me.Cursor = Cursors.WaitCursor
        Me.RadGridView1.BeginUpdate()
 
        For Each row As GridViewRowInfo In Me.RadGridView1.SelectedRows
            row.IsVisible = False
        Next
        Me.RadGridView1.EndUpdate(True)
    Finally
        Me.Cursor = Cursors.Default
    End Try
End Sub


hope someone finds this useful.

Richard

EDIT: Changed the BeginUpdate and EndUpdate to outside of the loop
Stefan
Telerik team
 answered on 17 Nov 2010
6 answers
227 views

Hello!


I have an issue with assigning the ImageIndex of GridCellElement.


Let’s take a simple code sample. An image list with a single image is assigned to the grid view. All settings are by default.


01.public partial class Form1 : Form
02.{
03.    public Form1()
04.    {
05.        InitializeComponent();
06. 
07.        for (int i = 0; i < 8; i++)
08.            radGridView1.Columns.Add(new GridViewTextBoxColumn());
09. 
10.        for (int i = 0; i < 8; i++)
11.            radGridView1.Rows.Add(radGridView1.Rows.NewRow());
12.    }
13. 
14.    private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
15.    {
16.        if ((e.CellElement.RowIndex + e.CellElement.ColumnIndex) % 2 == 0)
17.        {
18.            e.CellElement.ImageIndex = 0;
19.        }
20.    }
21.}

When I build this sample with “RadControls for WinForms Q3 2009 SP1” it shows the “chessboard”. But when I build it with the latest “RadControls for WinForms Q2 2010 SP2” it shows an empty grid.


To have it running as expected I have to do the following workaround (see line 5):


1.private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
2.{
3.    if ((e.CellElement.RowIndex + e.CellElement.ColumnIndex) % 2 == 0)
4.    {
5.        e.CellElement.ImageIndex = -1;
6.        e.CellElement.ImageIndex = 0;
7.    }
8.}

So, perhaps this is a bug.


Thank you.

Alexander
Telerik team
 answered on 17 Nov 2010
9 answers
2.0K+ views
Hi,
Is there a way to hide the first column in GridView? Or at least to change it to size 0-5?

Thanks
Andrew Shyliuk
Top achievements
Rank 1
 answered on 17 Nov 2010
3 answers
207 views
Hello,
I just upgraded from Q1 2010 Sp2 to Q2 2010 SP2, and it seems that the Aggregates property from the DataGroup class is gone.  I don't see anything on it in the release notes or on the forum.  Am I missing something?  Maybe I'm just wrong, I'm new to Telerik, I'm just upgrading a software made by someone who does not work here anymore...

Thank you!

Steve
Alexander
Telerik team
 answered on 17 Nov 2010
1 answer
491 views
Hello,

I have applied the Office2010 theme to my WinForm application by adding the Office2010Theme to the form and setting

ThemeResolutionService.ApplicationThemeName = Properties.Settings.Default.ApplicationThemeName;

Everything works just fine and I am satisfied with the result, except for one small detail. I would like to change the background color of the RadTreeView to white instead of the default gray-ish. Setting the BackColor property of the RadTreeView control does not do the trick, so is there any other way I can do it (in code or otherwise)?

Best regards
Linus
Richard Slade
Top achievements
Rank 2
 answered on 17 Nov 2010
7 answers
225 views
Hi,

I'm working in VB with 2010Q3 terik winform.

I have a RadDropDownList with some predefined items.
I wan't to give possibilty for users to enter their values if needed.

But I don't find how to trap when they have finished to enter the text.

The event IndexChanges fire only when they choose a predefined value
The event TextChange fire every time user press a key
The event SelectedValueChanged never fire !

I need to update my form when user choose a item from existing value or when user have finished to entered his own value.

Thanks for your help.

Anthony
Richard Slade
Top achievements
Rank 2
 answered on 17 Nov 2010
13 answers
216 views
Richard,

You may be aware of some support questions raised by Fathi Bellahcene at Total in Paris. He works for me. He's on a public holiday today in France so I can't contact him to get our support account details. I need to raise some support issues with you guys. Is it possible you could contact me at martin.ramsey@total.com please ?
Richard Slade
Top achievements
Rank 2
 answered on 17 Nov 2010
4 answers
454 views
I am looking to use the Timeline View with Resource Grouping to show a timeline of about three months, (from 2-weeks-ago to 2-months-from-now), all visible at once, and allow for scrolling beyond those visible limits.

It seems that, by default, the timeline shows only 7 days ahead of the StartDate which I have set to DateTime.Now.AddDays(-14) to set the first visible date back two weeks from today.  I would like to be able to set the number of visible days to ±70, (and eventually use a radtrackBar to dynamically change the number of visible days).

Aside from that, how would I set the width of the day 'columns' in the TimeLine?  Most of the appointments I will be adding to the scheduler will be several days, even weeks in duration and I will only require a month heading and a numerical day label.

Thanks,
Adam

Richard Slade
Top achievements
Rank 2
 answered on 17 Nov 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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?