Telerik Forums
UI for WinForms Forum
1 answer
171 views
i have a ComboBox with a size of 50, 20. In this combo box i have 4 items with the texts: 1, 2, 3, 4. when i start my application and i click on the combobox the drop down expands but has an width of about 100 px. If i click again on the combobox, the drop down expands but has a correct width of 50 px.
i can partialy fix the problem by setting the DropDownSizingMode to RightBottom, but i can't seem to get rid of the size grip element of the drop down. Any ideas?

Jordan
Telerik team
 answered on 28 Nov 2008
5 answers
368 views
Is the subject possible? I have one per expression calculated column on which I would like to count summary.
I can't get it working ...

Thanks in advance for any help.

F.
Martin Vasilev
Telerik team
 answered on 28 Nov 2008
8 answers
222 views
Hi,
I need to make this working:

GridView - binded to Collecion
In some interval ex: 1 second data is changing in collecion for example ( order_status )
it is  working - grid is updating necessary cells but when i set the grouping for this column ( order_status )
the situation is not soo good - items stays in previous order_status group. ( ex. 'Payment Arrive' )
I have pass this by updating grid via setting DataSource to changed collection and then it is woking but in this case
i cant do any operation like column reorder, drag column to grouping panel becouse in this interval ( one second ) list going to update
and i cant do this

Is there any good solution to make this working?
Martin Vasilev
Telerik team
 answered on 28 Nov 2008
5 answers
232 views
There's this odd bug/inconsitency I've been noticing with the latest DateTimePicker control. When you load the form initially, the very first time you click on a DateTimePicker to drop down the calendar and select a date, you must click on the date *twice* before the control will commit the selection.

Every selection after this will be immediately made (only two clicks required - drop down arrow & calendar number).

This feature has already tripped up some of my beta users - is there a way I can eliminate that first extra click?
Boyko Markov
Telerik team
 answered on 28 Nov 2008
3 answers
177 views
Hello,
Since I install the Q3 version of Telerik, I keep having pop-Up message Errors.
The first one is about two different Assemblies:
"Visual Studio is attempting to load class instances from different assembly than the original used to create your components.
This will result in failure to load your designed components.."


a "theme errors". saying :

And the other one is about themes
"Error loading theme from Telerik.WinControls.Themes.Button.XML : System.InvalidCastException: At least one element in the source array could not be cast down to the destination array type..."
A message error appears for every controls in my forms...

I hope you can help solve My problem
Thak you
Shirya


Nikolay
Telerik team
 answered on 27 Nov 2008
1 answer
179 views
Hello,

I need to have the background of the drop down portion of my combobox have alternating colors. I can accomplish this with an event handler for the ItemDataBound event and a simple counter like this:

private void radComboBox1_ItemDataBound(object sender, Telerik.WinControls.UI.ItemDataBoundEventArgs e) 
{ 
i++; 
 
FillPrimitive fpOneDropDownItem = (e.DataBoundItem.Children[0] as FillPrimitive); 
fpOneDropDownItem.BackColor = (i % 2 == 0) ? ColorTranslator.FromHtml("#000000") : ColorTranslator.FromHtml("#262626"); 
fpOneDropDownItem.NumberOfColors = 1; 
} 
 

I would like to get this behavior using a theme. Is it possible? I see there is an IsOdd property on the grid, is there something similar for the combobox?

Thanks,

-Gary
Nikolay
Telerik team
 answered on 27 Nov 2008
1 answer
434 views
I'm using the following straight from the help file to load a textboxelement to a RadMenu of:
(VS2008 VB.NET)

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
 Dim textItem As New RadMenuContentItem()
 Dim textBox As New RadTextBoxElement()
 textBox.Text = "Enter text here"
 textBox.MinSize = New Size(100, 0)
 textItem.ContentElement = textBox
 textItem.ContentElement.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren
 radMenu1.Items.Add(textItem)
 Dim buttonItem As New RadMenuContentItem()
 Dim button As New RadButtonElement()
 button.Text = "OK"
 AddHandler button.Click, AddressOf button_Click
 buttonItem.ContentElement = button
 radMenu1.Items.Add(buttonItem)
End Sub
Sub button_Click(ByVal sender As Object, ByVal e As EventArgs)
 Dim contentItem As RadMenuContentItem = TryCast(radMenu1.Items(0), RadMenuContentItem)
 Dim textBox As RadTextBoxElement = TryCast(contentItem.ContentElement, RadTextBoxElement)
 MessageBox.Show("Text is: " + textBox.Text)
End Sub

However I get the following error:
at radMenu1.Items.Add(textItem)

What do I need to do differently?
Thanks


System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls.UI"
  StackTrace:
       at Telerik.WinControls.UI.RadMenuContentItem.ArrangeOverride(SizeF finalSize)
       at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
       at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
       at Telerik.WinControls.Layout.WrapLayoutPanel.arrangeLine(Single v, Single lineV, Int32 start, Int32 end, Boolean useItemU, Single itemU)
       at Telerik.WinControls.Layout.WrapLayoutPanel.ArrangeOverride(SizeF finalSize)
       at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
       at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
       at Telerik.WinControls.RadElement.ArrangeOverride(SizeF finalSize)
       at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
       at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
       at Telerik.WinControls.RootRadElement.ArrangeOverride(SizeF finalSize)
       at Telerik.WinControls.RootRadElement.ArrangeCore(RectangleF finalRect)
       at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
       at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
       at Telerik.WinControls.RadElement.UpdateLayout()
       at Telerik.WinControls.ComponentLayoutElementTree.GetPreferredSize(Size sizeConstraints)
       at Telerik.WinControls.RadControl.GetPreferredSize(Size proposedSize)
       at System.Windows.Forms.Layout.DefaultLayout.xGetDockedSize(IArrangedElement element, Size remainingSize, Size constraints, Boolean measureOnly)
       at System.Windows.Forms.Layout.DefaultLayout.GetVerticalDockedSize(IArrangedElement element, Size remainingSize, Boolean measureOnly)
       at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
       at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
       at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
       at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
       at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.ContainerControl.OnLayout(LayoutEventArgs e)
       at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
       at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
       at System.Windows.Forms.Layout.LayoutTransaction.DoLayout(IArrangedElement elementToLayout, IArrangedElement elementCausingLayout, String property)
       at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
       at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
       at System.Windows.Forms.Layout.LayoutTransaction.DoLayout(IArrangedElement elementToLayout, IArrangedElement elementCausingLayout, String property)
       at System.Windows.Forms.Control.ControlCollection.Add(Control value)
       at Telerik.WinControls.RadControl.RegisterHostedControl(RadHostItem hostElement)
       at Telerik.WinControls.RadHostItem.PerformRoutedEventAction(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadHostItem.OnTunnelEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.UI.RadTextBoxItem.OnTunnelEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseTunnelEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseTunnelEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseTunnelEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.SetParent(RadElement parent)
       at Telerik.WinControls.RadElement.ChangeCollection(RadElement child, ItemsChangeOperation changeOperation)
       at Telerik.WinControls.RadElementCollection.OnInsertComplete(Int32 index, Object value)
       at System.Collections.CollectionBase.System.Collections.IList.Insert(Int32 index, Object value)
       at Telerik.WinControls.RadItemOwnerCollection.OnInsertComplete(Int32 index, Object value)
       at System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
       at Telerik.WinControls.RadItemCollection.Add(RadItem value)
       at Biosketch_2.PubMedGrid.PubMedGrid_Load(Object sender, EventArgs e) in C:\vs2008\Biosketch_2\Biosketch_2\PubMedGrid.vb:line 1729
       at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
       at System.Windows.Forms.UserControl.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.ControlCollection.Add(Control value)
       at Biosketch_2.MainForm.MainForm_Load(Object sender, EventArgs e) in C:\vs2008\Biosketch_2\Biosketch_2\MainForm.vb:line 77
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at Telerik.WinControls.RadFormBase.WndProc(Message& msg)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at Biosketch_2.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
Nikolay
Telerik team
 answered on 26 Nov 2008
5 answers
203 views
I'm trying to make two columns, one with a date and one with a time. I would use the DateTimeColumn, except there doesn't seem to be a very good way to format it as time. Also, the DateTimeColumn doesn't apply formatting to filter cells (or to its own cells for that matter - you have to modify them in the CellFormatting event.)

My solution was to just use MaskBoxColumns with masks that would correspond to date and time, respectively. However, MaskBoxColumns don't apply whatever value you assign to the Mask property, for whatever reason. It seems to always want to format anything entered as a monetary value, regardless of the mask. The MaskType value is also unavailable in this context.

My next step was to attempt to make a regular column and insert the MaskBoxeElements as necessary in the CellFormatting event, as described here: http://www.telerik.com/community/forums/thread/b311D-hhddm.aspx

This causes an exception in the "key" paramater of something - the stack trace was very vague and I couldn't pinpoint the problem, nor could I reproduce it when stepping through code - it only affected runtime.

So my question boils down to whichever of the following is easiest to answer:
1) Can I format a DateTimeColumn to be time? (e.g. 11:23 AM) If so, how do I apply DateTimeColumn formatting to a filter cell for that row?
2) Can I apply masks to MaskBoxColumns and have them actually affect the input?
3) Can I insert MaskBox controls into a column without causing fatal runtime errors?

Help is greatly appreciated, once I get this ironed out I don't forsee any other problems with my project; everything else is fairly straightforward.


Boyko Markov
Telerik team
 answered on 26 Nov 2008
1 answer
134 views
When I use System.Windows.Form as Telerik.WinControls.RadForm on Windows 2003 title bar is not shown (everything works fine on Windows XP). When I use other than Office2007Blue or ControlDefault styles (for example Desert) it's shown when I point mouse cursor over one of control box buttons, but it disappears again when window's state is changing (maximizing, minimizing and recover etc.). The solution is to use RadRibbonForm with RadTitleBar on it, but using RadForm is much easier.
Nick
Telerik team
 answered on 26 Nov 2008
1 answer
142 views
Hi can anyone help with this issue with gridview.

I have a gridview and the first column has been convert to the mutlicolumn dropdown. Then when i add a new row the gridview i want transfer the data from that row in the multicolumngridview dropdown to the gridview.

Hope someone can help, i am vb.net

Cheers

T
Martin Vasilev
Telerik team
 answered on 25 Nov 2008
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?