Telerik Forums
UI for WinForms Forum
3 answers
307 views
Hi,

I recently got the below exception, couldn't reproduce it again.
Any idea on this,

:Error At: radpageview1_SelectedPageChanging
 | System.OutOfMemoryException | Exception of type 'System.OutOfMemoryException' was thrown. | mscorlib |    at System.Collections.Generic.Dictionary`2.Initialize(Int32 capacity)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Telerik.WinControls.RadPropertyValueCollection.GetEntry(RadProperty prop, Boolean createNew)
   at Telerik.WinControls.RadElement.set_ShouldPaint(Boolean value)
   at Telerik.WinControls.Primitives.FillPrimitive.InitializeFields()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.UI.ScrollBarButton.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.RadItem..ctor()
   at Telerik.WinControls.UI.ScrollBarButton..ctor(ScrollButtonDirection direction)
   at Telerik.WinControls.UI.RadScrollBarElement.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.RadItem..ctor()
   at Telerik.WinControls.UI.RadScrollBarElement..ctor()
   at Telerik.WinControls.UI.RadScrollLayoutPanel.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.UI.RadScrollLayoutPanel..ctor()
   at Telerik.WinControls.UI.RadScrollViewer.CreateScrollLayoutPanel()
   at Telerik.WinControls.UI.RadScrollViewer.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.RadItem..ctor()
   at Telerik.WinControls.UI.RadScrollViewer..ctor()
   at Telerik.WinControls.UI.RadDropDownMenuElement.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.UI.RadDropDownMenu.CreatePopupElement()
   at Telerik.WinControls.UI.RadDropDownMenu.InitializeChildren()
   at Telerik.WinControls.UI.RadDropDownMenu..ctor(RadElement ownerElement, RadDropDownMenu parentPanel)
   at Telerik.WinControls.UI.RadDropDownMenu..ctor()
   at Telerik.WinControls.UI.RadContextMenuDropDown..ctor()
   at Telerik.WinControls.UI.RadContextMenu..ctor(IContainer owner)
   at Telerik.WinControls.UI.RadContextMenu..ctor()
   at Telerik.WinControls.UI.RadMaskedEditBoxElement..ctor()
   at Telerik.WinControls.UI.RadMaskedEditBox.CreateChildItems(RadElement parent)
   at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CreateChildItems(RadElement parent)
   at Telerik.WinControls.RadControl.ComponentOverrideElementTree.CreateChildItems(RadElement parent)
   at Telerik.WinControls.RadControl.Construct()
   at Telerik.WinControls.RadControl..ctor()
   at Telerik.WinControls.UI.RadMaskedEditBox..ctor()
   at Form1.InitializeComponent()
Boryana
Telerik team
 answered on 23 Nov 2012
9 answers
377 views
I can't seem to get the RadChart into a VS2010 toolbox. I'm using Q1 2010 SP2, and Q2 2010 Beta Winform controls in a .net 4 project.
Boryana
Telerik team
 answered on 23 Nov 2012
2 answers
133 views
Hi,
I'm trying to save last position of the tile element after I do drag and drop, but I cannot seems to find what event fired after I drop the RadTileElement in new position. I have tried using the mouseUp event, but it seems the MouseUp event doesn't fired when you do a drag drop.
Any suggestions what event fired after a drag drop in RadTileElement

Thanks,
Sendy
sendy
Top achievements
Rank 1
 answered on 23 Nov 2012
0 answers
119 views
Hi,
How to allow only C and D letters to be written int the third column of the radGridView. And prevent the user to type any other letters or characters??

Thankfully Yours.
Fadi
Top achievements
Rank 1
 asked on 23 Nov 2012
0 answers
136 views
Hi Telerik, 
I got a Radgrid in my project, when i load the data i used Cell Formatting to give some colors by this way.


private void PrimaryRadGridView_CellFormatting(object sender, CellFormattingEventArgs e)
        {
 
            if (e.CellElement.ColumnInfo.FieldName == "ID")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.BackColor = Color.LightSlateGray;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
 
            if (e.CellElement.ColumnInfo.FieldName == "Type")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.BackColor = Color.LightSlateGray;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
            if (e.CellElement.ColumnInfo.FieldName == "BBor")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                //e.CellElement.ForeColor = Color.Red;
                e.CellElement.BackColor = Color.LightGoldenrodYellow;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
            if (e.CellElement.ColumnInfo.FieldName == "EBor")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.ForeColor = Color.Red;
                e.CellElement.BackColor = Color.LightGoldenrodYellow;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
            if (e.CellElement.Value != null && e.CellElement.Value.ToString() == "PE0")
            {
                e.Row.Cells[4].ReadOnly = true;
                e.Row.Cells[4].Value = "XXXXXXXXXX";
                e.Row.Cells[4].Style.BackColor = Color.DarkRed;
                e.Row.Cells[4].Style.CustomizeFill = true;
            }
 
            
 
        }

Then I'm using to validate the cells and to change Fore & back color after the validation, but the color is not changing.
Cell Validated code:

private void PrimaryRadGridView_CellValidated(object sender, CellValidatedEventArgs e)
        {
 
 
            if (e.ColumnIndex != 3)
                return;
            if (e.RowIndex != -1)
            {
                int nextRowIndex = e.RowIndex + 1;
                int lastRowIndex = PrimaryRadGridView.Rows.Count - 1;
                if (nextRowIndex <= lastRowIndex)
                {
 
 
                    var value = PrimaryRadGridView.Rows[e.RowIndex].Cells[3].Value.ToString();
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Value = value;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].ReadOnly = true;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.ForeColor = Color.Blue;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.BackColor = Color.GreenYellow;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.CustomizeFill = true;
 
                    PrimaryRadGridView.ClearSelection();
 
                    PrimaryRadGridView.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[3].BeginEdit();
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.ForeColor = Color.Blue;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[3].Style.BackColor = Color.GreenYellow;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[3].Style.CustomizeFill = true;
 
 
                }
            }
             
        }

When i put a break point at both cell formatting & cell validated both are clashing each other. How ca i fix this  problem, please help me.
Karthik
Top achievements
Rank 1
 asked on 22 Nov 2012
4 answers
470 views
Hey Guys

Scratching my head over this one.. I have a grid populated by an SQL query.

On queries that require the vertical scroll bar to be shown , the first search displays with the Grid at the top of the results. ( scroll position at the top)

If I just hit search again without touching anything else... the scroll goes to the last row every time.

I have even tried setting this at the end of each search , but still the scroll appears at the end of the selection after the first populate.

 

Me.RadGridView1.TableElement.ScrollTo(0, 0)

 

 

I hate spending hours on something that is probably very easy !  It must be something I am doing to clear the Grid and repopulate it.. but haven't managed to find it!.

Any hints / thoughts?

Thanks

Rob

 

Jack
Telerik team
 answered on 22 Nov 2012
8 answers
312 views
Hi,

How to get the  row Border Coordinates of a gridView for a winform application.

Regards,
Vishal
Plamen
Telerik team
 answered on 22 Nov 2012
2 answers
115 views
How to change Style.BackColor property for particular Cell?
Plamen
Telerik team
 answered on 22 Nov 2012
12 answers
275 views
In radGridView I've GridViewComboBoxColumn column:
GridViewComboBoxColumn MemberColumn = new GridViewComboBoxColumn();
            MemberColumn.Name = "MemberColumn";
            MemberColumn.HeaderText = "Member";
            MemberColumn.DataSource = ctx.Members;
            MemberColumn.ValueMember = "MemberID";
            MemberColumn.DisplayMember = "MemberName";
            MemberColumn.FieldName = "MemberID";
            this.ResultGridView.Columns.Add(MemberColumn);

In EF model I've One to One Relationship:
Link
I want to show in MemberColumn dropdownlist show only not added items to ResultGridView from Members Entity.
Because user can't add twice 1 member to Data table.
Thanks



Julian Benkov
Telerik team
 answered on 22 Nov 2012
8 answers
1.7K+ views
Hi, i want to know how to set  row header text in datagird. usually, the icon arrow was displayed.
Plamen
Telerik team
 answered on 22 Nov 2012
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
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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?