Telerik Forums
UI for WinForms Forum
1 answer
194 views

i would like to expand or collapse the group by clicking on the group name.
my code crashes at e.Item.Group because Group is null.
why is group null when i click on the group name?

        private void Operation_lv_ItemMouseClick(object sender, ListViewItemEventArgs e) {
            if (e.Item.Group != null) {
                e.Item.Group.Expanded = !e.Item.Group.Expanded;
            }
        }

many thanks

Dimitar
Telerik team
 answered on 24 Jan 2019
75 answers
1.2K+ views
hi, which event is best to call this function?  I have tried Load and shown but I still get this error when I click on the grid :

"There is no property descriptor corresponding to property name:"

and the property name is blank. However, I can continue to work with the grid and click on different rows, it is just when I open the form and immediately click on the grid, is when I get this message. Thanks for any help.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jan 2019
4 answers
286 views

You have an excellent example of how to do CellFormatting on a Details ListView for a Bound list.  My issue is trying to mimmic the same effect with an unbound list.

Dim productRowView As DataRowView = TryCast(cell.Row.DataBoundItem, DataRowView)
If productRowView IsNot Nothing AndAlso CBool(productRowView.Row("Discontinued")) = True Then
    e.CellElement.BackColor = Color.Yellow
    e.CellElement.ForeColor = Color.Red
    e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
    e.CellElement.Font = newFont
Else
    e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local)
    e.CellElement.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local)
    e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local)
    e.CellElement.ResetValue(LightVisualElement.FontProperty, Telerik.WinControls.ValueResetFlags.Local)
End If

 

I don't know how to find if a row is "Discontinued" when the data isn't bound to the list.

Right now my ListView is heavily lagged and I'm not sure if it's due to the fact that I'm not resetting the values or if it's due to the functions involved with formatting the cells.

Dimitar
Telerik team
 answered on 24 Jan 2019
2 answers
176 views

how do i select an item programmatically in my listview so that the group is expanded, the item is selected and current, like radgridview isVisible = true, isCurrent = true ?

 

thanks

Andre
Top achievements
Rank 1
 answered on 23 Jan 2019
5 answers
917 views

Hi,

Is it possible that each time we select a new item in the autocompletebox, the selected item disappears from the list of auto complete items.

This is to avoid to enter twice the same items.

If this is possible, how to do it?

I put an attachment to show what is my current behaviour. What i would like is that once if have selected tag, it does not appears anymore in the list of choice

FYI, I am using auto completion with unbound mode.

Thanks a lot

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Jan 2019
5 answers
133 views

     Hi 

 

Dimitar
Telerik team
 answered on 23 Jan 2019
1 answer
217 views

Hi, 

Sometime the last chat message does not appear when the scrollbar is visible, to reproduced:

1- Type Test <ENTER> multiple time until you see the scrollbar

2- Scroll up to the middle so you can't see the last message

3- Type any word and scroll down

Now you can't see the last typed message, instead you may see small dot, You may need to repeat step 3 more than one time.

I'm not sure if it is related to Fluent Theme, because I wasn't able to reproduce it with Crystal Theme.

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Jan 2019
2 answers
353 views

I have a column with which get's edited using the ListViewDateTimeEditor.

The question is, how do I format the value that gets submitted to the ListView.

To be clear, I have already formatted the ListViewDateTimeEditor to use the following: 

Dim Editor As New ListViewDateTimeEditor
TryCast(Editor.EditorElement, BaseDateTimeEditorElement).Format = DateTimePickerFormat.Custom
TryCast(Editor.EditorElement, BaseDateTimeEditorElement).CustomFormat = "MM/dd/yyyy"
e.Editor = Editor

 

Even with this formatting, it still submits the full DateTime to the ListView when finished editing.  How do I make it output only the formatted Date value, without the Time?

Dimitar
Telerik team
 answered on 23 Jan 2019
1 answer
154 views

Hello,

I have 3 hierarchical levels in my grid. Here is the structure:

Master template

|___tab1: Details (html view)

|___tab2: Orders (standard grid)

       |___tab2-1: Clients (standard grid)

|___tab3: Networks (standard grid)

 

I'am inspired by some posts in the forum to save and restore the expanded rows and selected rows. It works great.

I save the grid state before data refresh, and reset after data refresh. Here is the code.

Dim scrollpos As Integer = -1
Dim CurrentRow As Integer = -1
Dim expandedRows As New List(Of Boolean)()
Dim selectedRows As New List(Of Boolean)()
 
    Private Sub SaveSeletectedAndExpanded()
        scrollpos = myGridView.TableElement.VScrollBar.Value
 
        If myGridView.CurrentRow IsNot Nothing Then
            CurrentRow = myGridView.CurrentRow.Index
        End If
        If myGridView.Rows Is Nothing Then
            Exit Sub
        End If
        expandedRows.Clear()
        selectedRows.Clear()
        For i = 0 To myGridView.Rows.Count - 1
            expandedRows.Add(myGridView.Rows(i).IsExpanded)
            ' How can I remember which page tab is displayed currently?
            selectedRows.Add(myGridView.Rows(i).IsSelected)
        Next
    End Sub
 
    Private Sub RestoreSeletectedAndExpanded()
        If scrollpos <> -1 Then
            myGridView.TableElement.VScrollBar.Value = scrollpos
        End If
        If CurrentRow <> -1 Then
            myGridView.CurrentRow = myGridView.Rows(CurrentRow)
        End If
        If expandedRows IsNot Nothing Then
            For i = 0 To expandedRows.Count - 1
                myGridView.Rows(i).IsExpanded = expandedRows(i)               
            Next
        End If
        If selectedRows IsNot Nothing Then
            For i = 0 To selectedRows.Count - 1
                myGridView.Rows(i).IsSelected = selectedRows(i)
            Next
        End If
    End Sub

 

But I've found that the current selected tabbed view in the expanded row is reset to default after refresh.

How can I save the current selected tabbled view index for the expanded rows ?

 

Thank you by advanced.

Hristo
Telerik team
 answered on 23 Jan 2019
1 answer
720 views

Hello, administrator

    In the past, I used the DataGridView control, but now I use the RadGridView control, but I can't find the EditingControlShowing event, I need this event now,

please tell me what event should I use instead of it

    Please reply me as soon as possible. Thank you

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Jan 2019
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
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?