Telerik Forums
UI for WinForms Forum
15 answers
233 views

I previously had Q3 2008 installed updated to Q1 2009 and now the save/load layout do not work. Actually the save works and creates the layout file but the load has no effect. Work fine before the update. Also noticed the demo only has a Save button, no Load button....

 

Can someone confirm that the load layout is broken or if I need to keep diggin..

Nick
Telerik team
 answered on 05 Jun 2009
1 answer
255 views
Hello,

I keep getting this "error" in my log files:

4/06/2009 15:19:52: <<WARNING>> Column count: 4.
4/06/2009 15:19:52: <<WARNING>> NetworkManager.cs -> clear telerik columns:    at Telerik.WinControls.UI.TableViewDefinition.Measure(GridRowElement row, SizeF availableSize)
   at Telerik.WinControls.UI.GridTableElement.ArrangeOverride(SizeF finalSize)
   at Telerik.WinControls.RadElement.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.LayoutAutoSizedControls(IArrangedElement container)
   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.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.Remove(Control value)
   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.SetParent(RadElement parent)
   at Telerik.WinControls.RadElement.ChangeCollection(RadElement child, ItemsChangeOperation changeOperation)
   at Telerik.WinControls.RadElementCollection.OnClear()
   at System.Collections.CollectionBase.Clear()
   at Telerik.WinControls.UI.GridRowElement.DisposeChildren(RadElementCollection children)
   at Telerik.WinControls.UI.GridRowElement.DisposeChildren(RadElementCollection children)
   at Telerik.WinControls.UI.GridRowElement.DisposeChildren(RadElementCollection children)
   at Telerik.WinControls.UI.GridRowElement.DisposeChildren(RadElementCollection children)
   at Telerik.WinControls.UI.GridRowElement.DisposeChildren(RadElementCollection children)
   at Telerik.WinControls.UI.GridRowElement.Dispose(Boolean disposing)
   at Telerik.WinControls.UI.GridTableHeaderRowElement.Dispose(Boolean disposing)
   at Telerik.WinControls.RadComponentElement.Dispose()
   at Telerik.WinControls.RadElement.Cleanup()
   at Telerik.WinControls.UI.GridTableBodyElement.CleanupRows()
   at Telerik.WinControls.UI.GridTableElement.Update(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.UI.GridViewTemplate.UpdateUI(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
   at Telerik.WinControls.Data.DataAccessComponent.ResetGrid()
   at Telerik.WinControls.Data.DataAccessComponent.UpdateColumns(NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.UI.GridViewTemplate.UpdateColumns(NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.UI.GridViewColumnCollection.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index)
   at Telerik.WinControls.Data.ObservableCollection`1.RemoveItem(Int32 index)
   at Telerik.WinControls.Data.ItemObservableCollection`1.RemoveItem(Int32 index)
   at Telerik.WinControls.UI.GridViewColumnCollection.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
   at adlogix.Views.NetworkManager.clearAdservedItemsColumns() in D:\networkManager\adlogix-views\Views\NetworkManager.cs:line 452, Object reference not set to an instance of an object..

the program doesn't crash, its just on this piece of code that I get the error message:

            if (rgvAllItems.MasterGridViewTemplate.Columns.Count > 0)  
            { 
                Log.LogMessageToFileWarnings("Column count: " + rgvAllItems.MasterGridViewTemplate.Columns.Count); 
                try  
                {  
                    while(rgvAllItems.MasterGridViewTemplate.Columns.Count > 0)  
                    {  
                        rgvAllItems.MasterGridViewTemplate.Columns.RemoveAt(0);  
                    }  
                      
                }catch(Exception ex)  
                {  
                    Log.LogMessageToFileWarnings(String.Format("NetworkManager.cs -> clear telerik columns: {0}, {1}", ex.StackTrace, ex.Message));  
                }  
            }  

before the while loop wasn't there and only existed with one line of code : rgvAllItems.MasterGridViewTemplate.Columns.Clear();

after some advice here on the forum to change it with the while loop I still got the same error message.
Strange thing is that the count of the columns is greater as zero so this should be giving any problems?

got the same message with this piece of code:
           
            if (rgvAllItems.MasterGridViewTemplate.ChildGridViewTemplates.Count > 0) 
            {
               
                try 
                { 
                    while (rgvAllItems.MasterGridViewTemplate.ChildGridViewTemplates.Count > 0) 
                    { 
                        rgvAllItems.MasterGridViewTemplate.ChildGridViewTemplates.RemoveAt(0); 
                    } 
                }catch (Exception ex) 
                { 
                    Log.LogMessageToFileWarnings( 
                        String.Format("NetworkManager.cs -> clear telerik ChildGridViewTemplates: {0}, {1}"
                                      ex.StackTrace, ex.Message)); 
                } 
            } 

just clearing the gridview for a rebind of other data, which is done without a problem. But I'm getting these errors in my log file on regular basis. So I'm curious what is happening since I have no idea If I'm doing something wrong here or not.

thanks in advanced





Jack
Telerik team
 answered on 05 Jun 2009
1 answer
151 views
Hello,

In my hierarchy gridview I have a columncombobox in my heading of my grid. So when I select a value in the combobox it is set to the hole structure of my grid.
Now I was wondering and I added it, that if I select more then one row and select a value of the combobox the value is being set only to the selected items in my grid.

All goes well until I selected an item to much. I wanted to deselect it, but that doesn't work. I need to select an item that isn't select.
But now all items are unselected except of one item. I searched on how I should handle this. but I didn't find it.

thanks in advanced
Jack
Telerik team
 answered on 05 Jun 2009
1 answer
167 views

Hi

How do I clear previously created conditional formatting items from the ConditionalFormattingObject

Which were created using:

Dim con1 As ConditionalFormattingObject = New ConditionalFormattingObject("white rule", ConditionTypes.Contains, Me.RadTextBox1.Text.ToLower, Me.RadTextBox1.Text.ToLower, True)

            c1.RowBackColor = Color.Green

            RadGridView1.MasterGridViewTemplate.Columns.FindByDataField("Country").ConditionalFormattingObjectList.Add(c1)

Thanks

Joe

Boryana
Telerik team
 answered on 05 Jun 2009
1 answer
497 views
Hi,

I need to highlight duplicates in a grid. I am using CellFormatting to validate data, probably should do it somewhere else?. The grid is unbound. 

How do I find the duplicate and change the appearance of it? This seems to be a rather bad way to do this. 

private void mygrid_CellFormatting(object sender, CellFormattingEventArgs e) 
            if (e.CellElement.ColumnInfo is GridViewDataColumn && !(e.CellElement.RowElement is GridTableHeaderRowElement)) 
            { 
                if (e.CellElement.ColumnIndex == userEmailColumn.Index) 
                { 
                    string emailValue = e.CellElement.RowInfo.Cells[userEmailColumn.Index].Value as string
 
                    if (!String.IsNullOrEmpty(emailValue)) 
                    { 
                        Match match = emailRegexValidation.Match(emailValue); 
 
                        if (!((match.Success && (match.Index == 0)) && (match.Length == emailValue.Length))) 
                        { 
                            e.CellElement.ForeColor = Color.Red; 
                            e.CellElement.ToolTipText = "E-mail is invalid"
                            valid = false
                        } 
 
                        // now look if there are any duplicates and mark them all



 
 
// Loop through all cells and find the duplicates?

Thanks,
/ jorge

Victor
Telerik team
 answered on 05 Jun 2009
5 answers
247 views
Can the TextBox of the DateTimePicker be set to read only so that the user cannot manually edit any of the date?  I tried using dtp.DateTimePickerElement.TextBoxElement.TextBoxItem.ReadOnly = true, but I was still able to edit the day. 

When a minDate value is set it appears to the user that they can edit the day and be able to be set the date to a date less than the min date.  Worse yet, say you have a minDate of 5/19/2008 and 5/20/2008 is selected.  If you edit the day to 31 and then edit it again to 15, it will stay at 31 (display = 5/15/2008, value = 5/31/2008).  Very confusing.

In the constructor, I set the MinDate, NullDate and value of the DateTimePicker = DateTime.Today.  If today is 5/19/2008, using the Picker I cannot select 5/19/2008.  I can only select 5/20/2008 and greater.

Are there properties that I need to set to avoid this situation?

Thanks,
Mike
Boyko Markov
Telerik team
 answered on 04 Jun 2009
1 answer
180 views
Hi - I have set the ShowCheckBox Property to True for my RadDateTimePicker (version 2009 Q1).  It appears the alignment is Top,Left.  How do I center it so it's consistent with the text?
Boryana
Telerik team
 answered on 04 Jun 2009
6 answers
255 views
Hi,

I have a grid which can contain more than one screen-ful of data. After population I call BestFitColumns() to auto-size the grid columns, but the logic is only applied to the visible rows. I want the columns to be resized based on ALL rows in the grid, since if the user scrolls down they see truncated cells.

Is this possible?

Regards
Prad
Top achievements
Rank 2
 answered on 03 Jun 2009
1 answer
1.8K+ views
Hi Telerik Team,

I am trying to add a button column in a WinForm gridview but I am unable to figure it out on how to do that.

Could you please provide me the sample code or assist me in doing so?

Thank you in advance!

Best Regards,
Vasanth

Shinu
Top achievements
Rank 2
 answered on 03 Jun 2009
1 answer
166 views
I am using a GridSpinEditor in my decimal columns, but when the user clicks on a cell has a null value and is initially blank, a 0.00 is entered into the cell editor automatically.  Thus the value is changed without the user making any changes other than clicking in the cell.  I need to leave the value blank unless the user actually changes it - i.e. have the editor's initial value be blank if the data is null.  I have tried using NullValue, DefaultValue, and even setting the text to blank inside CellEditorInitialized, but the 0.00 still shows up!  Is there a way to fix this?

Thank you,
Rachel
Jack
Telerik team
 answered on 03 Jun 2009
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?