Telerik Forums
UI for WinForms Forum
3 answers
144 views
Hi,
I’m  just evaluating your great gridview control and plan to use it in my future project as grid with a list of products. It must have a insert product functionality, so I need to replace the editor of standard text column with dropdown or another editor with autocomplete functionality.
The problem is that the products in selection are more than 30000 and there is some problems with performance when a text is typed in the editor and the control do the autocomplete operation. Another problem is that I must reload the editor datasorce every time on EditorRequired/EditorInitialized event although actually there is no changes in the datasource.
So my two questions are:
Is there a better approach to achieve autocomplete with lot of (30-50k) items without so many lag when typing?
And
Is there a way to use a editor without loading the datasource every time when the editor is required?

Thanks in Advance!
Slavcho
Dimitar
Telerik team
 answered on 18 Mar 2014
3 answers
80 views
Hi,
I have a grid that I have bound my columns to a datareader.  I have 2 columns that I look at in this grid when wanting to make a custom combobox for a cell and they are "Batch Status" and "Status ID" and they are both textbox cell types.  For the column "Batch Status" I want to make it a combobox for certain cells if the "Batch Status" is "Open".

To start out I create a list array of all my combobox items.
Private mstrBatchStatusList As New List(Of ComboBoxDataSourceObject)()

Then I go ahead and use CellFormatting to make the cell a combobox if the Batch Status is "Open".
Private Sub rgvBatch_CellBeginEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles rgvBatch.CellBeginEdit
        '
        ' Got this from a website.  http://www.telerik.com/forums/dynamically-adding-controls-in-the-columns-in-the-grid
        ' The status column is a canceled Edit because I have substituted cell elements with my own elements
        ' (RadDropDownListEditorElement). In this way, I do not need to enter in edit mode and initialize the
        ' default column editor, because it is going to mess up with the new elements. I just use the elements'
        ' events to manage the change of the value and to save the cell value.
        '
        If e.Column.HeaderText = "Status" Then
            e.Cancel = True
        End If
    End Sub
    Private Sub rgvBatch_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles rgvBatch.CellFormatting
        '
        ' Edit
        '
        If e.CellElement.ColumnInfo.HeaderText = "Edit" Then
            'This is how we get the RadButtonElement instance from the cell
            Dim button As RadButtonElement = CType(e.CellElement.Children(0), RadButtonElement)
            If e.CellElement.RowInfo.Cells("Batch_Status").Value IsNot Nothing Then
                Dim title As String = e.CellElement.RowInfo.Cells("Batch_Status").Value.ToString()
                If title = "Deleted" Then
                    button.Enabled = False
                Else
                    button.Enabled = True
                End If
            End If
        End If
        '
        ' Delete
        '
        If e.CellElement.ColumnInfo.HeaderText = "Delete" Then
            'This is how we get the RadButtonElement instance from the cell
            Dim button As RadButtonElement = CType(e.CellElement.Children(0), RadButtonElement)
            If e.CellElement.RowInfo.Cells("Batch_Status").Value IsNot Nothing Then
                Dim title As String = e.CellElement.RowInfo.Cells("Batch_Status").Value.ToString()
                If title <> "Open" Or mblnReadOnly Then
                    button.Enabled = False
                Else
                    button.Enabled = True
                End If
            End If
        End If
        '
        ' Status
        '
        If TypeOf e.CellElement.RowInfo Is GridViewDataRowInfo Then
            If e.CellElement.ColumnInfo.HeaderText = "Status" Then
                If e.CellElement.RowInfo.Cells("Batch_Status").Value IsNot Nothing Then
                    Dim strBatchStatus As String = e.CellElement.RowInfo.Cells("Batch_Status").Value.ToString()
                    Dim currentStatusID As Object = e.CellElement.RowInfo.Cells("AccPac_Batch_Status_ID").Value.ToString()
                    If strBatchStatus = "Open" And Not mblnReadOnly Then
                        Dim gvDropDownList As RadDropDownListEditorElement = Nothing
                        If e.CellElement.Children.Count = 0 OrElse Not (TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement) Then
                            e.CellElement.Children.Clear()
                            gvDropDownList = New RadDropDownListEditorElement()
                            For intI = 0 To mstrBatchStatusList.Count - 1
                                gvDropDownList.Items.Add(New RadListDataItem(mstrBatchStatusList.Item(intI).MyString, mstrBatchStatusList.Item(intI).Id))
                            Next
                            e.CellElement.Children.Add(gvDropDownList)
                            '
                            ' Preset the Drop down
                            '
                            If gvDropDownList IsNot Nothing Then
                                If currentStatusID IsNot Nothing Then
                                    gvDropDownList.SelectedValue = Convert.ToInt32(currentStatusID)
                                Else
                                    gvDropDownList.SelectedIndex = -1
                                End If
                            End If
                        Else
                            gvDropDownList = DirectCast(e.CellElement.Children(0), RadDropDownListEditorElement)
                        End If

                    ElseIf e.CellElement.Children.Count > 0 AndAlso TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement Then
                        '
                        ' Make sure any cells in the status column that are not "Open" status do not get changed to a combobox
                        '
                        e.CellElement.Children.Clear()
                    End If
                End If
            ElseIf e.CellElement.Children.Count > 0 AndAlso TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement Then
                '
                ' Make sure any other columns do not get changed to a combobox
                '
                e.CellElement.Children.Clear()
            End If
        End If
    End Sub

The above code works perfectly to setting the cell to a combobox when the Batch Status is "Open" and the drop down contains the correct values that are in my list array of (mstrBatchStatusList.Item.

Here are my questions:

1.  When I want to change my combobox value to a different item in the combobox, first I need to scroll to the right since my column you can't see.  I then change my value and scroll back to the left.  I then scroll back to the right and my combobox becomes reset to the original value.  It looks like upon scrolling right it calls the CellFormating function and when it gets to this line of the code (If e.CellElement.Children.Count = 0 OrElse Not (TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement) Then) it doesn't recognize that it's currently a combobox so it resets the combo box back to the original status id.

Why does this happen and how do I get this to not happen?

2.  If there an event that can be used that triggers a combo box change event so I can check the value it's changing to and set a flag that a value changed in the grid?

Thanks
 
George
Telerik team
 answered on 18 Mar 2014
6 answers
137 views
I am currently building a theme, based on the supplied Metro. I'm pretty sure this wasn't an issue in the previous version of the Winforms controls, but under the latest version (Q1 2014), I'm having an issue with the background colour of the QuickAccess bar. 

When located in the window title, the caption bar it coloured correctly.


However, when located below the ribbon, I want the bar that goes the full length of the window to be a different shade. To achieve this, I've changed the background colour of RadRibbonBar-RadRibbonBarElement-RadRibbonBarElement. This colours the strip correctly, but unfortunately, when the QuickAccess bar goes below the ribbon there is also an artefact in the application icon.


Is this a bug or am I missing a background setting elsewhere?

Cheers
Jason
George
Telerik team
 answered on 18 Mar 2014
1 answer
103 views
hello, how can i save dates from the scheduler/reminder into my database and also set the calender in the scheduler to load the dates from my very own database in c#.
George
Telerik team
 answered on 17 Mar 2014
2 answers
100 views
Hey!

We have just updated to latest version of Telerik (Q1 2014). After the update, we noticed wierd issue with radsplitbutton's graphics (screenshot).
We are using our own theme based on office2010Silver. No matter which theme I used, the issue was still  in there (Control default, office 2010 silver, our own theme). Is there any solution for this issue?


Thx,
Toni Hämeenniemi
George
Telerik team
 answered on 17 Mar 2014
3 answers
196 views
Hi, the labels on the x-axis go goofy when you rotate them.  Is there any work around to this, way to "align" them to the left/top, or any hope that it will be addressed in a future release? (attached)

Thank you
Ralitsa
Telerik team
 answered on 17 Mar 2014
3 answers
143 views
Hello,

I am trying to create a ListView that contains a custom visual item containing multiple ChartViews.   What I am trying to achieve is a list, with some text for each item on the left and multiple pie charts horizontally across the item.  I have looked at the documentation for creating custom items in a ListView and taken basically the same approach.  I create a StackLayoutPanel in CreateChildItems in my SimpleListViewVisualItem derived class.  I add a LightVisualElement to the layout which will contain some text.  Then I try to add RadChartElements to the stack.  The problem is I cannot figure out the correct way to create the RadChartElement for this scenario.   I have tried many variations, but none seem to work. 

 I have tried to declare RadChartView's as members in the VisualItem class, create them in them in CreateChildItems and add them with a call like layout.Children.Add(myChartView.ChartElement).   Then in SynchronizeProperties, I go ahead and blow away the series for the chart and recreate it with the correct data for the item.  This almost works, except that only the first item in my list will ever display correctly. 

I have tried to declare RadChartElement's as members of the VisualItem class, but then I cannot figure out how to set the series for the chart in SynchronizeProperties

I have even tried creating the RadChartView in CreateChildItems, then in SynchronizeProperties, I just recreate the RadChartView and point the children of the layout to the newly created chart.ChartElement.

I have tried just recreating the entire layout in SynchronizeProperties.

...and many more combinations.

The best I could do with any of my attempts did correctly display the *first item*, with text on the left and four pie charts with correct data to the right, but *only the first item*.  In all the other items, the chart elements appear blank.

Is this impossible in the current version of the controls for Winforms, or am I missing something?

Best regards,
Justin

George
Telerik team
 answered on 14 Mar 2014
7 answers
174 views

Using a GridView control to bind to Hierarchical Data programmatically.  One of the columns in the Child Template  is a Combo Box. One of the requirements is that the items listed in the combo box are dependent on a value from a Column in the Parent row.

 

For example, if a Column named KitNumber  in the Parent row has a value of  12345 on editing the child row, the combo box should only display the PartNumbers that are relevant to the KitNumber.  Sounds simple enough but I have not been able to figure this out using the GridView control.  Is this possible?

Any suggestions greatly appreciated.

Stefan
Telerik team
 answered on 14 Mar 2014
7 answers
273 views
Hello there,

I have changed the default Segoe font to Arial 9pt for my RadGridView using the IDE. But the drop-downlist of items in a GridViewComboBoxColumn does not follow and still displays as Segoe. There is no option in the IDE to alter it. I am trying to find out how to alter the font of the drop-down list in code please? (vb.net)

I imagine I could use VisualStyle builder but I cannot seem to export from that all the settings for a given off-the-shelf theme, and I do not havethe time to make a whole theme with all it's settings...

Thanks in advance
Stefan
Telerik team
 answered on 14 Mar 2014
3 answers
263 views
If SelectNextOnDoubleClick is enabled, even if the control is set to ReadOnly = true, you can change the value by double clicking on the control.

The only workaround seems to disable the setting...
Stefan
Telerik team
 answered on 14 Mar 2014
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?