Telerik Forums
UI for WinForms Forum
1 answer
214 views
I am trying to use the RadDataGrid view, with the autoGenerateColumn Property set to false, I added three columns as follows.          

radGridView1.Columns.Add(new
Telerik.WinControls.UI.GridViewDataColumn("ProductId"));
radGridView1.Columns.Add(new Telerik.WinControls.UI.GridViewDataColumn("ProductName"));
radGridView1.Columns.Add(new Telerik.WinControls.UI.GridViewDataColumn("UnitPrice"));

and then i bounded the data source to list<Products>

When I run the application and try to edit any of the fields or if I try to type in the filter box the application crashes with the following exception. While investigating the problem I found out that the default editor for the columns is never instantiated and is set to null

radGridView1.Columns["ProductId"].GetDefaultEditor()==null

Sample Code
-----------

  public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void Form1_Load(object sender, EventArgs e)

        {

            radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false; //disable auto generate columns

            radGridView1.EnableFiltering = true; //enable filter           

            radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

            //Add columns

            radGridView1.Columns.Add(new Telerik.WinControls.UI.GridViewDataColumn("ProductId"));

            radGridView1.Columns.Add(new Telerik.WinControls.UI.GridViewDataColumn("ProductName"));

            radGridView1.Columns.Add(new Telerik.WinControls.UI.GridViewDataColumn("UnitPrice"));           

            //Bind data           

            radGridView1.DataSource = GetProductList();

        }

        public List<Product> GetProductList()

        {

            var products = new List<Product>();

            products.Add(new Product("PRD-001", "Betty Crocker® Angel Food Cake Mix", 8.65));

            products.Add(new Product("PRD-002", "Betty Crocker Complete Desserts®", 8));

            products.Add(new Product("PRD-003", "Betty Crocker® Cookie Mix", 1.25));

            products.Add(new Product("PRD-004", "Betty Crocker® Frosting", 4.00));

            products.Add(new Product("PRD-005", "Betty Crocker® Sunkist® Lemon Bars", 10.00));

            products.Add(new Product("PRD-006", "Betty Crocker® Supreme Brownie Mix", 2.00));

            products.Add(new Product("PRD-007", "Betty Crocker® Variety Dessert Mixes", 3.55));

            products.Add(new Product("PRD-008", "Betty Crocker® Warm Delights® Desserts", 4.49));

            return products;

        }

    }

    public class Product

    {

        public Product()

        {

        }

        public Product(string id, string name, double price)

        {

            this.ProductId = id;

            this.ProductName = name;

            this.UnitPrice = price;

        }

        public string ProductId { get; set; }

        public string ProductName { get; set; }

        public double UnitPrice { get; set; }

    }

EXception Detail
-----------------------
System.ArgumentNullException was unhandled
  Message="Value cannot be null.\r\nParameter name: key"
  Source="mscorlib"
  ParamName="key"
  StackTrace:
       at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
       at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
       at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
       at Telerik.WinControls.UI.GridViewEditManager.GetDefaultEditor(IEditorProvider provider)
       at Telerik.WinControls.UI.BaseGridBehavior.InitializeEditor(RadGridView grid, GridViewColumn column)
       at Telerik.WinControls.UI.GridDataCellElement.item_Click(Object sender, EventArgs e)
       at Telerik.WinControls.RadItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadMenuItemBase.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e)
       at Telerik.WinControls.RadItem.DoClick(EventArgs e)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadElement.CallDoMouseUp(MouseEventArgs e)
       at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at Telerik.WinControls.UI.RadPopupControl.WndProc(Message& m)
       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.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       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(Form mainForm)
       at RadGridViewTest.Program.Main() in C:\Documents and Settings\ddebela\My Documents\Visual Studio 2008\Projects\RadGridViewTest\RadGridViewTest\Program.cs:line 17
       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:

Jordan
Telerik team
 answered on 30 Jul 2008
1 answer
135 views
Hi,

I am attempting to apply the Office2007BlackTheme from the Q2 2008 toolbox with no luck.

I can't find any information in the documentation on how to set my RadForm to this theme. In Q1 the theme was available straight from the ThemeName property on the form.

Thanks

Charles
Peter
Telerik team
 answered on 30 Jul 2008
1 answer
144 views
We are evaluating rad controls.  In the examples I noticed a property on the grid called "EnableHotTracking".  I am looking around for an explanation of that property.  But I couldn't find in the documentation other than the MSDN style help documentation which doesn't say nothing about that property.

Is there any detailed documentation that helps to reduce the learning curve on using these controls?


Nikolay Dobrev
Telerik team
 answered on 30 Jul 2008
4 answers
162 views
Hi,
i have created a Custom control from RadControl.
It has items (following the magnify example) but when theming:
a) the control dissapears when opening themebuilder (very strange)
b) all the subitems (no matter what type they are) gets the same theme as the parent (if the parent is themed as a button, all subitems gets this theme, even if they are radimages or checkboxes)..
Is there any way to create a custom theme item for this elements (they don't have the themename property) so i can give them a diferent look as the father?
Thanks in advance!
Angel
Telerik team
 answered on 29 Jul 2008
1 answer
492 views
Hello,

Is there other way to change font size for all controls in application, then looping through all containers ?

Let say that Ive changed RadTextBox font size from 10 to 20, after this control will change its height and cover controls under it. How can i keep constant spaceing between controls ?
Angel
Telerik team
 answered on 29 Jul 2008
2 answers
123 views
Hi,
i'm creating a custom control (following the magnify demo), but even when the "autoscroll" property is set, it does nothing for RadItems inside the container, only for "external" controls i placed over the control.
Is there any way to activate the scroll for this items created by the control itself?
Thanks in advance..
Angel
Telerik team
 answered on 29 Jul 2008
3 answers
243 views
Hi

I am trying to set the FormatString for a column in GridView.

I have tried "{0:C}" and "{C}", but it does not seem to retain the value.

I have even tried entering the format string into the designer but with no success.

Is this a know problem ? Or am I doing something wrong ?

Kind Regards
Peter
Telerik team
 answered on 29 Jul 2008
1 answer
45 views
dose RadControls for WinForms Q2  2008 Right-to-Left Language Support
for all controls or the same Q1 not all controls
Georgi
Telerik team
 answered on 28 Jul 2008
1 answer
76 views
Hello,

I am designing an application for touchscreens.
I would like to set the height of the radpanelbargroupelement a bit bigger so that it is a bit easier to click on it.

CaptionHeight only has a getter, so i would like to know how i can set the height of the control at runtime (preferably).

thanks,

walter
Boyko Markov
Telerik team
 answered on 28 Jul 2008
1 answer
77 views
I have only had the WinForms product for 2 and a half days so this is probably a beginners issue.  However, I have been at this non-stop the whole time.  So this isn't a give up and ask too quick deal.  I have had issues with visibilty changing automatically between runs, images offset by 10 or 15 pixels and I can't change the setting, and a myriad of other issue.  So this morning I backed off a simplified things.  I opened a new project, added a toolstrip, an element, an item, and both a button and imagebutton element.  Sometimes I can add an image sometimes it dies there, but other times I'll try and set image alignment or image over text and the Visual studion crashes.  I usually get the image in, it seems the first edit (I didn't change names or settings on the first three pieces) and Visual studio asks me if I want to report the problem.

It's got to be something simple right?  I have begun to be daring with the product.  Thanks
Boyko Markov
Telerik team
 answered on 28 Jul 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)
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?