Telerik Forums
UI for WinForms Forum
1 answer
86 views
Hi,

How to set Culture Info for a filter on a GridViewDateTimeColumn ? The columns culture is set to "en-US" and the dates are displayed in mm/dd/yyyy format. But, when I use the filter on this column, the filter drop down shows values in dd/mm/yyyy format. I have attached the screen shot highlighting the problem.

Thanks,
Venkat
Svett
Telerik team
 answered on 08 Dec 2011
1 answer
220 views
hi there,

i have a question about the classes that inherit form Telerik.WinControls.UI.BaseListViewVisualItem.

What are the differences between the following children classes:

Telerik.WinControls.UI.BaseListViewGroupVisualItem
Telerik.WinControls.UI.DetailListViewVisualItem
Telerik.WinControls.UI.IconListViewVisualItem
Telerik.WinControls.UI.SimpleListViewVisualItem

????

I ask because I have a RadListView where i want to add records/rows that contain Microsoft user controls.  so on that note, which class should be best used for this?

Thank you
Ivan Todorov
Telerik team
 answered on 08 Dec 2011
1 answer
193 views
I have a few listviews, each bound to a generic list of a simple class. When the user clicks a button I want to remove an item from one list and add it to another. I am able to do this just fine but the listview does not refresh it's contents. What is the method required to rebind or reload the bound data?
Ivan Todorov
Telerik team
 answered on 08 Dec 2011
3 answers
171 views

Current Version we are using is Q2 2010 SP1 Version 2010.2.10.713. We are facing the following issue:

In grid CellEndEdit, we perform some operation on the current item of the binding source and then trying to reset it. When we use ResetBindings(), it throws the null reference (PFA) and when we use ResetCurrentItem() or ResetItem(), it throws index out of range exception (but the item which we are trying to reset is present in the binding source).

1. If we use ResetBindings() on a text box inside the child grid:
An unhandled exception occurred, and the application is terminating. For more information, see your Application event log.
 - Exception Details -
Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.GridViewEditManager.EndEdit()
   at Telerik.WinControls.UI.GridRowBehavior.ProcessEnterKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKeyDown(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridEditor.OnKeyDown(KeyEventArgs keyEventArgs)
   at Telerik.WinControls.UI.GridSpinEditor.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.GridSpinEditor.spinElement_KeyDown(Object sender, KeyEventArgs e)
   at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadSpinElement.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadSpinElement.textItem_KeyDown(Object sender, KeyEventArgs e)
   at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
   at System.Windows.Forms.TextBox.WndProc(Message& m)
   at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

2. If we use ResetCurrentItem() or ResetItem() instead on the same text box field in the child grid:
 

An unhandled exception occurred, and the application is terminating. For more information, see your Application event log.

- Exception Details -

Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

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.Data.RadCollectionView`1.get_Item(Int32 index)

at Telerik.WinControls.Data.RadCollectionView`1.Find(Int32 itemIndex, Object dataBoundItem)

at Telerik.WinControls.Data.RadDataView`1.Find(Int32 itemIndex, Object dataBoundItem)

at Telerik.WinControls.Data.RadListSource`1.ChangeItem(Int32 index, TDataItem item)

at Telerik.WinControls.Data.RadListSource`1.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)

at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)

at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)

at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)

at System.Windows.Forms.BindingSource.ResetCurrentItem()

at Lbg.PlanNet.Client.BusinessModules.PersonalAdviceProcess.UI.AllocateAssetsToMultipleAimsView.allocatedValueElement_ValueChanged(Object sender, EventArgs e) in c:\Sasi\CurrentLatest\Client\SmartClient\BusinessModules\BusinessModules.PersonalAdviceProcess.UI\Views\AllocateAssetsToMultipleAimsView\AllocateAssetsToMultipleAimsView.cs:line 439

at System.EventHandler.Invoke(Object sender, EventArgs e)

at Telerik.WinControls.UI.RadSpinElement.OnValueChanged(EventArgs e)

at Telerik.WinControls.UI.GridSpinEditorElement.SetSpinValue(Decimal value, Boolean fromValue)

at Telerik.WinControls.UI.RadSpinElement.EndTextEdit()

at Telerik.WinControls.UI.RadSpinElement.Validate()

at Telerik.WinControls.UI.GridSpinEditor.OnKeyDown(KeyEventArgs e)

at Telerik.WinControls.UI.GridSpinEditor.spinElement_KeyDown(Object sender, KeyEventArgs e)

at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)

at Telerik.WinControls.UI.RadSpinElement.OnKeyDown(KeyEventArgs e)

at Telerik.WinControls.UI.RadSpinElement.textItem_KeyDown(Object sender, KeyEventArgs e)

at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)

at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)

at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)

at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)

at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)

at System.Windows.Forms.Control.WmKeyChar(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.TextBoxBase.WndProc(Message& m)

at System.Windows.Forms.TextBox.WndProc(Message& m)

at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.



Kindly advise if there is any way to avoid this error?.

Jack
Telerik team
 answered on 08 Dec 2011
11 answers
994 views
Hi Telerik,

Thanks for the awesome jobs in releasing Q2. I solved many of my problems.

But I face this problem:
I set the grid autoscroll=false, autosize=fill and verticalscrollstate=autohide,

When i add data into grid the vertical scroll bar will show althought it's not needed. And when i scroll  the vertical scroll the scroll is dissappear. How to make it appear when only needed?

I can confirm that the size of the grid is not limited the area. Thank again
Nikolay
Telerik team
 answered on 08 Dec 2011
2 answers
173 views
Hi,

If I try to delete a row in the CellEndEdit event I get an "Object reference not set to an instance of an object." exception.

I tried using row.Delete() and removing the item from the underlying datasource but both generates the same error.

Using: 2010.3.10.1215

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
   at Telerik.WinControls.UI.GridViewEditManager.EndEdit()
   at Telerik.WinControls.UI.GridRowBehavior.ProcessEnterKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKeyDown(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridEditor.OnKeyDown(KeyEventArgs keyEventArgs)
   at Telerik.WinControls.UI.RadTextBoxEditor.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadTextBoxEditor.TextBoxItem_KeyDown(Object sender, KeyEventArgs e)
   at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
   at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
   at System.Windows.Forms.TextBox.WndProc(Message& m)
   at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How do I solve this?

Regards,
Brian
Jack
Telerik team
 answered on 08 Dec 2011
5 answers
607 views
I recently updated from 2010 Q1 to 2011 Q3.  I have several DateTimePickers throughout my application, and the vast majority have these settings:  MinDate = 01/01/1900; NullDate = 01/01/1900; NullText = "Not Selected"; Text = ""; Value = 01/01/1900.

Users started reported some odd errors, and when I eventually tracked them down, I realized that the Value of the DateTimePicker controls was often being reset to whenever I opened the forms/user controls containing those DateTimePickers in the designer.  The TEXT, however, was NOT changing (making it difficult to spot without manually investigating the properties of each DateTimePicker).  When I would try to change the Value back to 1/1/1900, the change would not be accepted, instead reverting back to the Now time from before.  However, if I changed the time to some other value, then back to 1/1/1900, it would accept it.  Then, if I opened the form again, the Value would stay at 1/1/1900.

I have fixed this problem for my application through 2 methods:  1) In my base form and base user control, used by everything else, I loop through all the controls and set the Value to 1/1/1900 (prior to any other activity with those controls); 2) I opened every form in my application and reset the dates.  Though 1 should certainly be sufficient, I didn't like the idea that simply opening a form would change code, so I wanted to get that taken care of.

So, I have this first application working, but now I'm about to go through the laborious process of upgrading several others to this version of the controls, and I suspect I will have the same issue.  I'm hoping you guys have an idea what is going on.

My own thoughts were that maybe a) having MinDate and NullDate as the same value was somehow bad (see the wrongly posted small section in http://www.telerik.com/community/forums/winforms/calendar-and-datetimepicker/raddatetimepicker-does-not-work.aspx for an implication that this could be an issue) or b) RadDateTimePicker defaults to Now when added to a form/control, and it uses some value normally set in the more recent version to tell if this DateTimePicker was just added.  B seems more likely to me because that would explain how manually changing the time in the designer to another value, then changing it back to 1/1/1900, would work -- some value is being set then, and now the DateTimePicker realizes it is not newly added, so it "sticks."  Or ... maybe it is a combination or those, or something else entirely.

Thoughts?
Peter
Telerik team
 answered on 08 Dec 2011
3 answers
71 views
I am aware keytips can be used for the radribbonbar. Is there a way to use the directional arrows to navigate the radribbonbar.

Thanks
Peter
Telerik team
 answered on 08 Dec 2011
1 answer
144 views
Hi Telerik

I am building a multicolumn dropdown list in which I wish to use grouping. The grid has three columns, SecurityType, InstrumentGroup and Instrument. I want to group on SecurityType and within that grouping by InstrumentGroup so as to create a little hierarchy to act as a visual aid in selection.

If I allow manual grouping and drag the required columns to the group panel everything works fine but if I attempt to achieve the grouping programmaically the group header text for the InstrumentGroup header shows the same text as the SecurityType header.

I have attached the relevant snippet in the hope that you will have some insight into this one. Please note the commented out code was left in so you could see the other method I tried.

Regards
Ian Carson

Grid is setup like so..

private void GenerateMComboGrids()
{
    mcboInstrument.AutoSizeDropDownToBestFit = true;
    mcboInstrumentComboElement = mcboInstrument.MultiColumnComboBoxElement;
    mcboInstrumentComboElement.MultiColumnPopupForm.DropDownAnimationDirection = RadDirection.Left | RadDirection.Down;
    mcboInstrumentComboElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
    mcboInstrumentComboElement.DropDownHeight = 100;
    mcboInstrumentComboElement.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
    mcboInstrumentComboElement.EditorControl.MasterTemplate.AutoGenerateColumns = false;
    mcboInstrumentComboElement.EditorControl.ShowGroupedColumns = false;
    mcboInstrumentComboElement.EditorControl.ShowRowHeaderColumn = false;
    mcboInstrumentComboElement.EditorControl.EnableGrouping = true;
    mcboInstrumentComboElement.EditorControl.AutoExpandGroups = true;
    mcboInstrumentComboElement.EditorControl.ShowGroupPanel = false;
    mcboInstrumentComboElement.RightToLeft = true;
    
    GridViewTextBoxColumn column = new GridViewTextBoxColumn("SecurityType"); 
    column.HeaderText = "Security Type";
    mcboInstrumentComboElement.EditorControl.Columns.Add(column);
    GridViewTextBoxColumn column2 = new GridViewTextBoxColumn("InstrumentGroup"); 
    column2.HeaderText = "Instrument Group";
    mcboInstrumentComboElement.EditorControl.Columns.Add(column2);
    GridViewTextBoxColumn column3 = new GridViewTextBoxColumn("Instrument"); 
    column3.HeaderText = "Instrument";
    mcboInstrumentComboElement.EditorControl.Columns.Add(column3);
    mcboInstrumentComboElement.EditorControl.GroupDescriptors.Expression = "SecurityType ASC; InstrumentGroup ASC";
    //GroupDescriptor descriptor = new GroupDescriptor();
    //descriptor.GroupNames.Add("SecurityType", ListSortDirection.Ascending);
    //GroupDescriptor descriptor2 = new GroupDescriptor();
    //descriptor2.GroupNames.Add("InstrumentGroup", ListSortDirection.Ascending);
    //mcboInstrumentComboElement.EditorControl.GroupDescriptors.Add(descriptor);
    //mcboInstrumentComboElement.EditorControl.GroupDescriptors.Add(descriptor2);
    //mcboInstrumentComboElement.EditorControl.GroupSummaryEvaluate += new GroupSummaryEvaluateEventHandler(EditorControl_GroupSummaryEvaluate);
}


Data is entered using this method and for testing there is only a single row as follows:
SecurityType="Forex", InstrumentGroup="EUR", Instrument="EUR/USD"

private void PopulateInstrumentList()
{
    StrategyDistinctInstruments instruments = new StrategyDistinctInstruments(ThisVariation.StrategyVariation);
    Dictionary<string, BacktestInstrument> uniqueInstruments = instruments.UniqueInstruments;
    mcboInstrumentComboElement.EditorControl.TableElement.BeginUpdate();
    foreach (KeyValuePair<string, BacktestInstrument> kvp in uniqueInstruments)
    {
        GridViewRowInfo rowInfo = mcboInstrumentComboElement.EditorControl.Rows.AddNew();
        rowInfo.Tag = kvp.Value.Inst;
        rowInfo.Cells[0].Value = kvp.Value.SecurityType;
        rowInfo.Cells[1].Value = kvp.Value.InstrumentGroup;
        rowInfo.Cells[2].Value = kvp.Value.Inst.Name;
    }
    mcboInstrumentComboElement.EditorControl.TableElement.EndUpdate(true);
      
}




 
Julian Benkov
Telerik team
 answered on 08 Dec 2011
3 answers
122 views
How about letting the user select multiple document windows (tabs) for instance by pressing Shift and then have options in the Context Menü like Close Selected, Close all but these etc?

Regards
Erwin
Julian Benkov
Telerik team
 answered on 08 Dec 2011
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)
Chart (obsolete as of Q1 2013)
Form
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?