Telerik Forums
UI for WinForms Forum
2 answers
694 views

With Standard comboboxes, I would set up a Key and Value. When I try the same with the RadDropdownlist, I get an error, when I try to get the value for the SelectedItem.Key.

The following code block is how I populate the RadDropdownlist. This works just fine. Notice line 10 and 11 where I set the members as Key and Value

01.''' <summary>
02.''' Populates the dropdown_ cust serv cntry.
03.''' </summary>
04.Private Sub PopulateDropdown_CustServCntry()
05. 
06.    cboCustServ_Cntry.Items.Clear()
07. 
08.    Try
09.        cboCustServ_Cntry.DataSource = New BindingSource(dictCntry, Nothing)
10.        cboCustServ_Cntry.DisplayMember = "Value"
11.        cboCustServ_Cntry.ValueMember = "Key"
12. 
13.        'Default to US
14.        cboCustServ_Cntry.SelectedIndex = cboCustServ_Cntry.FindString("UNITED STATES"'United States code
15. 
16.    Catch ex As Exception
17.    End Try
18.End Sub  'PopulateDropdown_CustServCntry

 

When I enter the following code for the SelectedIndexChanged event, I get the error at line 07. Is there a way I can make this work with the radDropdownlist?

01.Private Sub cboCustServ_Cntry_SelectedIndexChanged(sender As Object, e As Telerik.WinControls.UI.Data.PositionChangedEventArgs) Handles cboCustServ_Cntry.SelectedIndexChanged
02.    'need to set up State dropdown based on selected country
03.    Dim CntryCode As String = ""
04. 
05.    Try
06.        Try
07.            CntryCode = cboCustServ_Cntry.SelectedItem.Key
08.        Catch ex As InvalidCastException
09. 
10.        End Try
11. 
12. 
13.        If Not IsNothing(CntryCode) AndAlso CntryCode.Trim <> "" Then
14.            PopulateDropdown_CustServState(CntryCode)
15.            cboCustServ_State.SelectedIndex = -1
16.        End If
17. 
18.    Catch ex As Exception
19. 
20.    End Try
21.End Sub  'cboCustServ_Cntry_SelectedIndexChanged

 

I appreciate your input!

 

 

Dimitar
Telerik team
 answered on 11 Oct 2016
2 answers
263 views
We are opening a usercontrol inside a RadPageView. And in that usercontrol we have a text box with tabindex 5 and we want that when the usercontrol load the focus should be to that control and we have tried  textbox.focus() and textbox.select() method but nothing is working. Please help in this regards
Dimitar
Telerik team
 answered on 10 Oct 2016
1 answer
395 views

Hi,

I meet a question on BeginEdit() function. When I call "this.gridView.Rows[1].Cells[1].BeginEdit();" , the text in Rows[1].Cells[1] will be selected so user will overwrite the previous text with the new type. I notice  System.Windows.Forms has a function  "BeginEdit(bool)" in GridView so developer can call

"BeginEdit(bool)" to not select any contents. Does Telerik has any similar functions to help me unselect text in a Cell? Or How can I unselect text in a Cell programmaticly if I call BeginEdit()?

 

Thank you,

Chen

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Oct 2016
5 answers
1.5K+ views
Hello,

i have a Gridview which is bind with a table adapter to a database. On this form i have a button for deleting records and it works very well. When i'm deleting a record and i'm refill the table adapter i immediately see the changes.

But here's the problem. When i'm trying to insert a new user from a another form (not that one, where the gridview is), then the changes are not updated.

I've tried to Refresh the MasterTemplate from the other form, but that doenst work. Also i placed a sub on the form with the gridview and tried to call it from the other form, but that doenst works neither.

But when i place a button on the original form where the gridview is and i fire the sub with the button, the changes are working well!

Can anybody help me with this issue?

Greets
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Oct 2016
5 answers
204 views

I need to perform data retrieval and analysis on recurring appointment instances that exist in the future.

Here is the business logic:

1.  User selects a date & resource combination.

2.  Application pulls instances from scheduler tables.

3.  Instances are loaded into var or datatable for application retrieval and analysis

Problem:

Instances of future recurring appointments do not exist in scheduler appointment table so I cannot perform a filtered retrieval.

Question:

How can I perform this action?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Oct 2016
5 answers
503 views
Hello,


I have a grid with 3 levels of grouping.

1- Department
   2- Employee
      3-Wage Code

I use server side code to a a checkbox to the Department Group header in the RadGrid_Prerender (is that the right way to do it??)
So now I need to be able to click on that check box and have it SELECT ONLY the records in that particular groud (e.g. depart)

See attached image.


Hristo
Telerik team
 answered on 07 Oct 2016
1 answer
281 views

Hello,

 

So I am new to Telerik Winform. I had amazing experience using Telerik. But what I still don't get it is how to use the RadLayoutControl.

As far as my understanding, RadLayoutControl provide a customize layout template design method completed by user drag and drop controls on the LayoutControl object (what I called layer 1).

My questions is when I wanted to place a control on top of a control that already top of a Layout control(which I called layer 2), system treat my intention as I want to place another Layer 2 control which I wanted that control to be placed on layer (e.g. place a control on collapsible panel).

Do I misunderstand the purpose of layoutcontrol?

 

Sorry for my bad english.

Ralitsa
Telerik team
 answered on 07 Oct 2016
35 answers
614 views
Since upgrading to Q3 SP1 I'm getting an error trying to use the BestFitColumns method on the GridView. What worked great on Q3 is now giving me an ArgumentOutOfRange exception.

Error Message is "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
Stack trace is as follows:
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Telerik.WinControls.UI.StretchColumnLayoutHelper.ResizeColumn(Int32 delta)
   at Telerik.WinControls.UI.TableViewRowLayout.ResizeColumn(Int32 delta)
   at Telerik.WinControls.UI.TableViewRowLayout.StretchColumn(GridViewColumn column, Int32 desiredWidth)
   at Telerik.WinControls.UI.BestFitHelper.SetColumnWidth(GridViewColumn column, Single desiredWidth)
   at Telerik.WinControls.UI.BestFitHelper.BestFitColumnsCore()
   at Telerik.WinControls.UI.BestFitHelper.ProcessRequests()
   at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
   at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
   at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
   at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridViewTemplate.FireViewChangedEvent(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   at Telerik.WinControls.UI.GridViewTemplate.BestFitColumns()
   at HBS.Scanesthesia.WinForms.MainForm.SelectedPageChanged(Object sender, EventArgs e) in C:\Users\bschultz\Documents\Visual Studio 2010\Projects\Scanesthesia\HBS.Scanesthesia.Forms\MainForm.cs:line 267
   at HBS.Scanesthesia.WinForms.MainForm.ShownForm(Object sender, EventArgs e) in C:\Users\bschultz\Documents\Visual Studio 2010\Projects\Scanesthesia\HBS.Scanesthesia.Forms\MainForm.cs:line 48
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at System.Windows.Forms.Form.CallShownEvent()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

Any ideas? Has this changed some how from Q3 -> SP1?
Hristo
Telerik team
 answered on 05 Oct 2016
8 answers
349 views
Hello all,

in 2011 Q1 winforms, i have a user control inherited from RadMultiColumnComboBox, and the filter row for inner radgrid is enabled.
problem is when i click on the filter row, the popup close ! so i cannot get focus on the filter row textbox to type the filtering text .

would you please tell me why this is occuring and how can i solve it ?

Thank you,
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Oct 2016
1 answer
207 views

Hi,

I have a radgridview that is populated with data via a LINQ query.

LINQ returns an async list and if it is not a null list the datasource of the grid is set.

After the grid is populated I want to be able to grab multiple rows in it (perhaps by holding CTL) and then drag these rows into another grid / control.

I have got this to work on a grid populated with simple data via a loop. I can't get it to drag when it has a datasource set.

Can anyone help?

Thanks,
Martin.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Oct 2016
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
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
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?