Telerik Forums
UI for WinForms Forum
1 answer
104 views
hi,
i have the latet download (yesterday) on the winform control.

I founf this bug, let me explain

I have data from a Datatable bound to the grid.  A simple code, decription.  I wnt to be able to add new codes and descriptions but once added I want he code to be readonly.  So I add this code to the form


    Private Sub rg_States_CellBeginEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles rg_AssumptionGroupsTypes.CellBeginEdit
        'Cancel edit if we are on an existing row and column 0
        ' turns the State abr to readonly
        If e.RowIndex > -1 Then
            If e.ColumnIndex = 0 Then
                e.Cancel = True
            End If
        End If
    End Sub

The purpose of the code is to check if the current column is 0 and we have a rowindex then I want to cancel the edit using the GridViewCellCancelEventArgs method cancel

This is great works first time but if you click very fast on the cell it exceptions . 

Here is the error

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls.GridView"
  StackTrace:
       at Telerik.WinControls.UI.GridDataCellElement.SetEditorFocus()
       at Telerik.WinControls.UI.GridDataCellElement.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args)
       at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseBubbleEvent(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.RadControl.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.UI.RadGridView.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 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(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at HousingCashFlow.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()


I have found other bugs in the grid as well but this one is cheesing me off.


Greg

Jack
Telerik team
 answered on 21 Feb 2008
9 answers
258 views
I'm using the following code to set the current row in the RadGridView. When I set the CurrentRow property, then get it directly after, I'm finding that the CurrentRow is never the same as the row that I set. The code is always returning true though, so the set is happening. I've tried this after the DataBound event happens and still it doesn't work. What am I doing wrong?

public bool SetCurrentRow(DataRow r, string fieldname, object val)
        {
            if ((this.Columns.FindByDataField(fieldname) == null
                 || r[fieldname] == null))
            {
                string m = string.Format("{0} failed. Grid columns or row columns did not contain '" + fieldname + "'."
                  , "SetCurrentGridRow");
                throw new ApplicationException(m);
            }

            System.Diagnostics.Debug.WriteLine("");

            System.Diagnostics.Debug.WriteLine("Looking for: "+ r[fieldname].ToString());

            foreach (GridViewRowInfo v in this.Rows)
            {
                if (v.DataBoundItem is DataRowView)
                {
                    if ((v.DataBoundItem as DataRowView).Row != null)
                    {

                        DataRow row = (v.DataBoundItem as DataRowView).Row;
                        System.Diagnostics.Debug.WriteLine(row[fieldname]);
                        if (row[fieldname].Equals(val))
                        {
                            this.CurrentRow = v;
                            this.GridElement.Update(false);
                            return true;
                        }                      
                    }
                }
            }

            return false;
        }

I've even tried this.CurrentRow = this.Rows[2] and it's not working.
Jack
Telerik team
 answered on 21 Feb 2008
6 answers
839 views
Dear all,

We are pleased to announce the immediate availability of the first public beta of the Telerik CAB Enabling Kit!

The Composite UI Application Block (CAB) is designed to help in building complex, enterprise-ready Windows Forms solutions. As part of WinForms UI component development, Telerik is strongly committed to provide seamless and easy integration with the CAB infrastructure for developers. In fact Telerik is one of the first vendors to provide support for the CAB and the SCSF.

The Telerik CAB Enabling Kit features 
  • Workspaces 
    • RadDockableWorkspace 
    • RadTabWorkspace 
       
  • UIElementAdapters
    • RadMenuUIAdapter 
    • RadMenuItemsCollectionUIAdapter 
    • RadToolStripElementAdapter 
    • RadToolStripItemAdapter 
    • RadTreeViewUIAdapter 
    • RadTreeNodeUIAdapter 
       
  • CommandAdapters 
    • RadMenuItemCommandAdapter 
    • RadTreeNodeCommandAdapter 
       
  • CAB Application Classes
    • RadWindowsFormsApplication 
    • RadFormShellApplication 
    • RadApplicationContextApplication 
       
  • Supported Telerik components in this version
    • RadTreeView 
    • RadDock 
    • RadMenu 
    • RadPanelBar 
    • RadTabStrip 
    • RadToolStrip 
    • (coming soon) RadGridView wrapper

Download Telerik CAB Enabling Kit Beta 1

You can find more information on the Can Enabling Kit on our CAB Support page.

The beta of the Telerik CAB Enabling Kit includes the early bits of the upcoming Q2 2007 RadControls for WinForms suite. It comes with a Finance Application modeled after Microsoft's WPF WoodGrove Finance Application.

Since this is the first beta of the CAB Kit we expect some glitches, and your comments and opinions will be much appreciated. Feel free to post all ideas, suggestions and feedback in this Forum. The most active beta users will be awarded with up to 5,000 Telerik Points.

Resources

Vassil Petev
Telerik team
 answered on 21 Feb 2008
1 answer
266 views
Instead of having long, single line buttons, I would like to have multiple lines but I cannot figure out the magic.
Nikolay
Telerik team
 answered on 20 Feb 2008
1 answer
99 views
Hi,

I have two quick questions pertaining to the ShapedForm and RibbonBar.  Firstly, when I click on my app's button in the Windows task bar, it maximizes it like it should.  However, when I maximize another window - one of any other application - Vista does a growing-like effect from the bottom of the screen which it applies to the window.  Also, when I click a window again, it will minimize using the opposite transformation effect.  However, in my rad.Controls-powered application, no minimization occurs during this process, let alone with the integrated Vista effect.  Do you guys know about this?  If so, is there a workaround or upcoming fix?

Secondly, when I right click the title bar or task bar button of a standard application, it opens a context menu with the options Restore, Move, Size, Minimize, Maximize, and Close.  In my application, however, this context menu appears neither when I right click the RibbonBar or the task bar button.  Again, is there a way to resolve this issue?

Are these problems caused by the usage of ShapedForm, or what?  Thank you very much for any help you can provide - this stuff is really frustrating me!

-UIdev
Jack
Telerik team
 answered on 19 Feb 2008
1 answer
288 views
Dear sir,

            When i click the "+" (or) "-" symbol in the treeview node not working.
            
Jordan
Telerik team
 answered on 19 Feb 2008
1 answer
182 views
Hy,

we had 2 projects where we had older Telerik controls in use. Now we installed the new Telerik Controls for Windows Forms and have major problems with this.

Some smaler problems was that some black writing on white background was now white on thite background.

But the bigest Problem ist that ist nearly impossible so get into the Form.cs[Design]. Only if you get the latest Version 2 to 3 times you can work with the Design for about 1 hour.

The arror message ist

ErrorImage One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

The path is not of a legal form.

Hide    

at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectDependencies(Project project)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreCase, Assembly& assembly, ReferenceType refType)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(ITypeResolutionService trs, String name, Dictionary`2 names)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary`2 names, CodeStatementCollection statements, String className)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)


I hope someone can help me.
Vassil Petev
Telerik team
 answered on 18 Feb 2008
1 answer
130 views
I used to use Infragistics grids with this code and it worked fine but doesnt work with the Telerik Grids

Dim

AuthCheck As New MySql.Data.MySqlClient.MySqlConnection(Conn)

Dim AuthGo As New MySql.Data.MySqlClient.MySqlCommand("Auth", AuthCheck)

AuthGo.CommandType = Data.CommandType.Text

Dim AuthGo2 As New MySql.Data.MySqlClient.MySqlCommand("Auth", AuthCheck)

AuthGo2.CommandType = Data.CommandType.Text

AuthGo.CommandText =

"SELECT recipe as Recipe, ingredients as Ingredients, id as ID FROM book"
AuthGo2.CommandText = "SELECT ingredients as Ingredients, id FROM book"

Dim AuthGoAdapter As New MySql.Data.MySqlClient.MySqlDataAdapter(AuthGo)

Dim DS As New Data.DataSet()

Dim DST As New Data.DataTable()

Dim DST2 As New Data.DataTable()

Dim AuthGoAdapter2 As New MySql.Data.MySqlClient.MySqlDataAdapter(AuthGo2)

AuthGoAdapter2.Fill(DS,

"DST2")

AuthGoAdapter.Fill(DS,

"DST")

DS.Relations.Add(

"DST6", DS.Tables("DST").Columns("id"), DS.Tables("DST2").Columns("id"))

rgv.DataSource = DS.Tables(

"DST")

Julian Benkov
Telerik team
 answered on 18 Feb 2008
1 answer
242 views
Hi, is there any way to design my own color dialog by using RadColorDialog ? Cause I want to change the borderstyle into my own border and I want to add some function into it.

Thanks in advance.
Kiril
Telerik team
 answered on 18 Feb 2008
1 answer
236 views
How to add image for a label added in panel bar.I can see command button supports a mage,cannot see image property for label.

Boyko Markov
Telerik team
 answered on 18 Feb 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
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?