Telerik Forums
UI for WinForms Forum
17 answers
396 views
Hi Support,

I update my project to Telerik Winform Q2 2010. I encounter a problem with the new release in my project when I sort (ascending or descending) a column and then drag the column to a new position.

You can reproduce this error in the Q2 2010 Demo.
1. Select Grid View - Populate with data - Data Binding
2. Sort the Contact Name column
3. Drag the Contact Name column between the Contact Title and Address column.

This is the exception detail I obtain in my code:
System.ArgumentException was unhandled
  Message="DataItem not contains 'idesc' property name."
  Source="Telerik.WinControls"
  StackTrace:
       à Telerik.WinControls.Data.RadDataView`1.ValidateDescriptors()
       à Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
       à Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
       à Telerik.WinControls.Data.RadDataView`1.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
       à Telerik.WinControls.Data.RadCollectionView`1.sortDescriptors_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       à Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       à Telerik.WinControls.UI.GridViewSortDescriptorCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       à Telerik.Collections.Generic.NotifyCollection`1.InsertItem(Int32 index, T item)
       à Telerik.WinControls.Data.SortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
       à Telerik.WinControls.UI.GridViewSortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
       à System.Collections.ObjectModel.Collection`1.Add(T item)
       à Telerik.WinControls.UI.GridViewColumn.Sort(RadSortOrder sortOrder, Boolean multiSortMode)
       à Telerik.WinControls.UI.GridViewColumn.set_SortOrder(RadSortOrder value)
       à Telerik.WinControls.UI.GridViewColumn.Initialize()
       à Telerik.WinControls.UI.GridViewDataColumn.Initialize()
       à Telerik.WinControls.UI.GridViewColumn.set_OwnerTemplate(GridViewTemplate value)
       à Telerik.WinControls.UI.GridViewColumnCollection.InsertItem(Int32 index, GridViewDataColumn item)
       à System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
       à Telerik.WinControls.UI.RadGridViewDragDropService.Move[T](Collection`1 collection, Int32 oldIndex, Int32 newIndex)
       à Telerik.WinControls.UI.RadGridViewDragDropService.MoveOnLeftOrRight[T](Boolean isDroppedAtLeft, Collection`1 collection, T targetItem, T draggedItem)
       à Telerik.WinControls.UI.GridHeaderCellElement.ProcessDragDrop(Point dropLocation, ISupportDrag dragObject)
       à Telerik.WinControls.RadItem.Telerik.WinControls.ISupportDrop.DragDrop(Point dropLocation, ISupportDrag dragObject)
       à Telerik.WinControls.RadDragDropService.Commit()
       à Telerik.WinControls.RadService.Stop(Boolean commit)
       à Telerik.WinControls.RadDragDropService.Telerik.WinControls.IMessageListener.PreviewMessage(Message& msg)
       à Telerik.WinControls.RadMessageFilter.NotifyGetMessageEvent(Message& msg)
       à Telerik.WinControls.RadMessageFilter.GetMessageHookProc(Int32 code, IntPtr wParam, IntPtr lParam)
       à System.Windows.Forms.UnsafeNativeMethods.GetMessageW(MSG& msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
       à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       à System.Windows.Forms.Application.Run(Form mainForm)
       à Virtuo.Program.Main() dans C:\Projet\Virtuo\Virtuo\Program.cs:ligne 19
       à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Thank you,

Nadia
DDM Consulting
Top achievements
Rank 2
 answered on 01 Oct 2010
3 answers
116 views
Hi guys,

I'm in the process of upgrading our application's telerik version from Q2 2009 to the latest version currently listed on your site.

The app uses quite a lot of RadGrids and RadRibbonForms which was customised extensively and isn't working anymore.

Is there any demo available that shows how the mdi works for the new version where clicking on the active document would change the ribbon menu to the active document's menu?



Jack
Telerik team
 answered on 01 Oct 2010
1 answer
229 views
Hi -

I am trying to display a grid with no outer border (around the outside of the grid).

I Binged and searched several options, such as setting the BorderWidth = 0, but none of the things I tried actually removed the border.

Is there a way to clear the border?

If I do have to have a border, is there a way to make it rounded?

Thanks!
Svett
Telerik team
 answered on 01 Oct 2010
1 answer
152 views
Hi everybody,

I get an .Net Framework Exception while switching between Windows :(

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. 

   bei Telerik.WinControls.UI.TableViewRowLayoutBase.InvalidateRenderColumns()

   bei Telerik.WinControls.UI.TableViewRowLayout.InvalidateRenderColumns()

   bei Telerik.WinControls.UI.RowsContainerElement.UpdateWhenColumnsChanged()

   bei Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)

   bei Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)

   bei Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)

   bei Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)

   bei Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)

   bei Telerik.WinControls.UI.GridViewSynchronizationService.OnPostCallback(Object state)

 


I don't even know which grid it is, or how to handle it, because my application is still running whithout any evect.
Jack
Telerik team
 answered on 01 Oct 2010
8 answers
274 views
Hello,

RunExport throws now this Exception: "Cannot find any base cell element!".

My Code:

ExportToExcelML exporter = new ExportToExcelML(gridview);
            exporter.HiddenColumnOption = HiddenOption.DoNotExport;
            exporter.ExportVisualSettings = true;
            exporter.SummariesExportOption = SummariesOption.ExportOnlyBottom;
            exporter.HiddenRowOption = HiddenOption.DoNotExport;
            exporter.SheetName = "Export";

            string filename = Path.Combine(Path.GetTempPath(), "excel_export.xls");

            try
            {
                exporter.RunExport(filename);
                return filename;
            }
            catch (Exception e)
            {
                return string.Empty;
            }

I have no idea what i have to change.

Regards,
Thomas
Martin Vasilev
Telerik team
 answered on 01 Oct 2010
4 answers
629 views
Ok

I have a simple but annoying problem. 

A datatable  bound to a radgridview and 1 column is checkboxcolumn. If user clicks the checkboxcolumn, cell goes to edit mode bot not changed the value on the datatable. After press enter button or selecting a different row value changes on datasource.
so I wrote a code for close editor on value changed


  private void RouteGrid_ValueChanged(object sender, EventArgs e)
        {
 RadCheckBoxEditor editor = sender as RadCheckBoxEditor;
            if (editor != null)
            {
                (editor.EditorManager as GridViewEditManager).CloseEditor();
            }
}

But my problem is if i want to change the source all values on the grid changes except selected row or current row. I changed all the property of the rows and cells property (IsSelected,IsCurrent...) but value never changes.

Here is my code
private void btnCancelChanges_Click(object sender, EventArgs e)
        {
            RouteGrid1.CurrentRow = null;
            RouteGrid1.Enabled = false;
 
            if (MessageBox.Show("...", "...", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                DataRow[] Result = null;
                this.Cursor = Cursors.WaitCursor;
                foreach (DataTable routeTable in viewSalesmanInfo.RouteTableCollection)
                {
 
                    if (routeTable != null && routeTable.Rows.Count > 0 && !String.IsNullOrEmpty(routeTable.TableName))
                    {
 
                        Result = routeTable.Select("m_Current_State_Id = 0 AND Current_State_Id = -1");
                        if (Result != null && Result.Length > 0)
                            foreach (DataRow addCustomer in Result)
                                routeTable.Rows.Remove(addCustomer);
 
                        Result = routeTable.Select(
                            "(OrderRoute <> m_OrderRoute Or " +
                            "PaymentRoute <> m_PaymentRoute Or " +
                            "DeliveryRoute <> m_DeliveryRoute Or " +
                            "MergeRoute <> m_MergeRoute Or " +
                            "Route_Position <> m_Route_Position)" +
                            " OR m_Current_State_Id <> Current_State_Id");
                        if (Result != null && Result.Length > 0)
                            foreach (DataRow updateCustomer in Result)
                            {
                                updateCustomer.BeginEdit();
                                updateCustomer["Current_State_Id"] = updateCustomer["m_Current_State_Id"];
                                updateCustomer["Route_Position"] = updateCustomer["m_Route_Position"];
                                updateCustomer["MergeRoute"] = updateCustomer["m_MergeRoute"];
                                updateCustomer["OrderRoute"] = updateCustomer["m_OrderRoute"];
                                updateCustomer["PaymentRoute"] = updateCustomer["m_PaymentRoute"];
                                updateCustomer["DeliveryRoute"] = updateCustomer["m_DeliveryRoute"];
                                updateCustomer.EndEdit();
                            }
                    }
                }               
this.Cursor = Cursors.Default;
                this.RouteGrid1.MasterTemplate.Refresh();
                RouteGrid1.Enabled = true;
            }
        }

But after this selected cell value doesnt change. 

Is this a bug or is there anything wrong in my code?




Emanuel Varga
Top achievements
Rank 1
 answered on 01 Oct 2010
8 answers
523 views
I have the following code and I need to convert the value that comes from GridAggregateFunction.sum,

Dim summary As New GridViewSummaryItem("dur", " Total: {0} ", GridAggregateFunction.Sum)
           Me.grdResults.MasterTemplate.SummaryRowGroupHeaders.Add(New GridViewSummaryRowItem(New GridViewSummaryItem() {summary}))

The values in the dur column are in seconds and I need to convert that to hh:mm:ss. I have a function that will do the conversion but don't see how to call it on that value (GridAggregateFunction.Sum) before it is displayed in the grid.

I tried several things in the ViewCellFormatting and CellFormatting events but that just causes my  app to throw a TargetInvocationException error everytime I start it.

Any ideas would be greatly apprectiated.
Alexander
Telerik team
 answered on 01 Oct 2010
1 answer
179 views
Alright I have a Dock Manager with a Docked Tabbed Window and several DockWindow's Docked to the Right Side of the Winform App. Now is there any way I can make it so it WONT allow any of my other DockWindows to be able to dock to that Tabbed document? I dont see any propertys on my inheritted DockWindow/UserDockControl.
Richard Slade
Top achievements
Rank 2
 answered on 01 Oct 2010
1 answer
154 views
Hi all,

I am using Telerik RadControls for WinForms 2010Q2 on Win2003 Server, implementing in dotnet 3.5 on Visual Studio 2008. I can't find in RadControls documentation anything about dialog controls for opening files or selecting folders, thus I am using standard OpenFileDialog and OpenFolderDialog. Are there equivalent RadControls? Or is there a way to style standard dialogs like RadControls?

Thanks
Roberto
Richard Slade
Top achievements
Rank 2
 answered on 01 Oct 2010
1 answer
203 views
Hi,
I need to have different hierarchy levels to individual row of Rad Gid view in my winform application.
Like-
A
B
:..X
C
:..Y
    :..Z

As shown above  A,B,C are the Rows of same Rad Grid view but all having different hierarchy Levels
A does not have any hierarchy .
B is having  one child gird named X.
C is having one child grid name Y and every row of Y having one child grid Z.
 I am having 3 buttons in my application 1,2,3.
on button click 1 i want to add A type row to Rad grid.
on button click 2 i want to add B type row to Rad grid.
on button click 3 i want to add C type row to Rad grid.

How to perform this Operation with Rad Gid for Winfoms in Visual Studio 2008 (Dot Net Framework 3.5) Sp1
in C# .net

Regards
Gaurav


Emanuel Varga
Top achievements
Rank 1
 answered on 01 Oct 2010
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?