Telerik Forums
UI for WinForms Forum
4 answers
251 views
Can I drag and drop the row to reorder the rows in radgridview ?

Thanks in Advance
Ragupathi
jerry
Top achievements
Rank 1
 answered on 19 Feb 2010
3 answers
497 views

Hello,

I've got a bit of a problem with Q2 2009 GridView. I use a child GridViewTemplate, but whenever I try to expand its row (with row.IsExpanded = true) I get a NullReferenceException at Telerik.WinControls.UI.DataGroup.get_RowCount()
at Telerik.WinControls.UI.GridViewInfo.SetViewInfoToRows(DataGroup rootGroup)
at Telerik.WinControls.UI.GridViewInfo.InitializeChildViewInfo()
at Telerik.WinControls.UI.GridViewTemplate.CreateGridViewInfo(DataGroup rootGroup, GridViewDataRowInfo parentRow)
at Telerik.WinControls.UI.GridViewDataRowInfo.SetExpanded(Boolean value)
at Telerik.WinControls.UI.GridViewRowInfo.set_IsExpanded(Boolean value).

After looking closely at what's going on I noticed that DataGroup.owner is null, and DataGroup.IsDisposed == true. I think the group gets disposed in DataAccessComponent.InitDataGrid() when I set DataMember of my ChildGridViewTemplate to null and its DataSource to a DataTable that was earlier filled with data. 

After that the DataGroups never get recreated, so when I try to expand my ChildGridViewTemplate, DataGroups are still disposed (with owner set to null) and I get the exception. I also noticed that if I add new data rows to the DataTable after assigning it as DataSource than the new rows expand just fine, only the old ones throw exceptions.

So my question is, is there any way I can force the DataGrid to recreate disposed DataGroup for already existing rows ?

Regards,

Piotr Kochanowski

Nick
Telerik team
 answered on 19 Feb 2010
3 answers
88 views
I thing every Vista / Windows 7 users know what I talking about.
This could be a fantastic way to navigate though a tree of items.

Right now I did my home-made one with a panel and a series of RadDropDownButton
Martin Vasilev
Telerik team
 answered on 19 Feb 2010
3 answers
533 views
In my application I would like to set font for all labels via themes, which work great.
Most labels sit next to controls which are set to bold.

But as I was adding more labels I noticed that some labels that I have been adding should not be bold, should be using the same font type that the rest of the labels do, but should not be set to bold.

I have tried several things, but any change to font in code is overwritten by the theme.
I have tried looking at setting conditions in the theme, but radlabelelement has nothing useful i can bank on.

Thank you,
Michael Marr
Top achievements
Rank 1
 answered on 19 Feb 2010
3 answers
167 views
Is the new style builder not in the beta release?  I uninstalled the prev release, installed the beta, opened my project, went to the smarttag on a textbox, and the old editor opened...

Did I do something wrong, do we get to the new editor in a different way?
Nikolay
Telerik team
 answered on 19 Feb 2010
1 answer
140 views
Is there a way to get notified (via an event) when a DockWindow (with DockState=Autohide) slides out or in?  I'm trying to set the focus on a textbox located in the autohide window when it is shown by mousing over the tab.

Thanks

Alain
Nikolay
Telerik team
 answered on 19 Feb 2010
6 answers
203 views
Hi,
 I have a RADMenuItem for Refresh with a command binding for Action command set for CTRL + F5 using the designer. When I build the application, the command binding gets reset to default which is nothing...
What should I be doing?

Thanks
Deepak
Dobry Zranchev
Telerik team
 answered on 19 Feb 2010
8 answers
656 views

Please, can you help me with this question:

I have a grid with combobox column. All of these comboboxes have different DataSorce property (assigned thouth intercepting CellEditorInitialized event):

    Private Sub gridSort_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles gridSort.CellEditorInitialized  
        Dim i As Integer  
        If gridSort.CurrentColumn.HeaderText = "Order" Then  
            Dim editor As Telerik.WinControls.UI.RadComboBoxEditor = gridSort.ActiveEditor  
            Dim editorElement As Telerik.WinControls.UI.RadComboBoxEditorElement = editor.EditorElement  
 
            If gridSort.Rows.IndexOf(gridSort.CurrentRow) = 1 Then  
                i = editorElement.SelectedIndex  
                editorElement.DataSource = New String() {"Minimized", "Maximized"}  
                editorElement.SelectedIndex = i  
                If i < 0 Then  
                    Dim ii As Integer = 0  
                    For Each ss As String In editorElement.DataSource  
                        If ss = gridSort.CurrentRow.Cells.Item(1).Value Then  
                            editorElement.SelectedIndex = ii  
                            Exit For  
                        End If  
                        ii += 1  
                    Next  
                End If  
            Else  
                i = editorElement.SelectedIndex  
                editorElement.DataSource = New String() {"Ascending", "Descending"}  
                editorElement.SelectedIndex = i  
            End If  
        End If  
    End Sub 

1. Every time editorElement.SelectedIndex have value -1 (and I must set value by searching throuh DataSource list and comparing with cell Value). For values Minimized/Maximized it's done and work fine, but for values Ascending/Descending it's not and when I click on combobox field - it's filled by empty sring.

Comparing with Value of cell is not fine because here can be some duplicated values (sic!) and I can not determine what value was in this cell before. Is here some method of determine SelectedIndex after changing of value?

2. I want to collect data choosen by user. But ComboBox cell in grid have not SelectedIndex (or I can not find it?) and I must to obtain it from Value property. Problem is similiar with previous question - how can I find a real position of value in DataSource list?

Saurabh Garg
Top achievements
Rank 1
 answered on 19 Feb 2010
1 answer
128 views
Hello,

I have reported a problem with the pinned rows (in the radGrid) for the Q3 2009, this problem do not seem to be resolved in the Q1 2010 Beta.


Regards.

Court Philippe.
Nick
Telerik team
 answered on 19 Feb 2010
3 answers
184 views
I'm using 2009 Q3 Winforms.  In order to create a multi-select dropdown combobox, I used a few other forum posts' responses as a guide.  I created a GridMenuItem class that inherited from RadMenuItemBase and implemented INotifyPropertyChanged.  That GridMenuItem contains a RadGridView and adds that GridView as a RadHostItem to its children. 

Anyway, what happens is that the dropdown grid will resize itself each time you drop it down.  It appears to be decreasing the height while increasing the width, by a small amount (I think around 6 both ways).  Eventually you get to an ever-increasing line.  I cannot seem to figure out what is wrong.

Below is the code to show what is happening.

Thoughts?

(Create a new Forms project with Form1, add a dropdown button)

 

Imports Telerik.WinControls  
Imports Telerik.WinControls.UI  
Imports System.Text  
Imports System.Data.Common  
Imports System.ComponentModel  
 
Public Class Form1  
 
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        Dim Item As GridMenuItem = New GridMenuItem  
        Dim Grid As RadGridView = Item.Grid  
 
        Grid.Columns.Add(New GridViewDataColumn("A"))  
        Grid.Columns.Add(New GridViewDataColumn("b"))  
        Grid.Columns.Add(New GridViewDataColumn("c"))  
        Grid.Rows.Add("Hello", "World", "!")  
        Grid.Rows.Add("Hello", "World", "!")  
        Grid.Rows.Add("Hello", "World", "!")  
        Grid.ReadOnly = False 
        Grid.Columns(0).Width = 5 
        Grid.Columns(1).ReadOnly = True 
        Grid.Columns(2).IsVisible = False 
        RadDropDownButton1.Items.Clear()  
        RadDropDownButton1.Items.Add(Item)  
    End Sub  
End Class  
 


Here's the item:

Imports Telerik.WinControls.UI  
Imports Telerik.WinControls  
Imports System.ComponentModel  
 
Public Class GridMenuItem  
    Inherits RadMenuItemBase  
    Implements INotifyPropertyChanged  
 
    Dim _Grid As RadGridView  
    Dim _HostItem As RadHostItem  
 
    Public ReadOnly Property Grid() As RadGridView  
        Get  
            Return Me._Grid  
        End Get  
    End Property  
 
    Protected Overrides Sub CreateChildElements()  
        _Grid = New RadGridView()  
        _Grid.BeginInit()  
        _Grid.BindingContext = New BindingContext()  
 
        _Grid.MultiSelect = True 
        _Grid.AutoSize = False 
        _Grid.HideColumnChooser()  
        _Grid.ReadOnly = False 
        _Grid.ShowGroupPanel = False 
        _Grid.ShowNoDataText = False 
        Dim Template As GridViewTemplate = _Grid.MasterGridViewTemplate  
        Template.AllowCellContextMenu = False 
        Template.AllowColumnChooser = False 
        Template.AllowColumnHeaderContextMenu = False 
        Template.AllowColumnReorder = False 
        Template.AllowAddNewRow = False 
        Template.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill  
        Template.EnableGrouping = False 
        Template.ShowFilteringRow = False 
        Template.ShowRowHeaderColumn = False 
        Template.ShowColumnHeaders = False 
 
        _Grid.EndInit()  
        _HostItem = New RadHostItem(_Grid)  
        Me.Children.Add(_HostItem)  
    End Sub  
 
    Protected Overrides Function MeasureOverride(ByVal availableSize As System.Drawing.SizeF) As System.Drawing.SizeF  
        Dim size As System.Drawing.SizeF = MyBase.MeasureOverride(availableSize)  
        Return _Grid.Size  
    End Function  
End Class  
 
Nikolay
Telerik team
 answered on 19 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
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?