Telerik Forums
UI for WinForms Forum
1 answer
168 views
Hi All,
I've got the following problem:
I created a Form that contains a GridView which I use as a SearchDialog.

I call Form.ShowDialog() -> set Filter on the UI (first row in the gridView) -> select a Row -> click ok
So far, everything works fine. Because I want to keep the current settings on the SearchDialog I don't dispose it.
Now, when I call Form.ShowDialog() the second time it appears that I can't change any filters.

Is there a workaround?
this.radGridView1.MasterGridViewTemplate.FilterExpressions.Clear(); doesn't work either.

Thanks!
Jack
Telerik team
 answered on 19 Jun 2009
3 answers
207 views
Hey at Telerik

I have 2 problems but one solution probably solves both. :)

I have a RadGridView with a ChildGridViewTemplate. When the masterrecord has no child records i can not expand the child table, the expand arrow is shown though. How am i then supposed to add a new child record?
I have the AddNewRow shown at the top of the grid.

I need the grid to expand it's child records no matter what and maybe show a "No data to display" when no child records exists.
This way the "Add new record" row will also be available for child records.

Hope there is an easy fix for this.

Regards

Morten
Jack
Telerik team
 answered on 18 Jun 2009
1 answer
185 views
Hi ,

I am working on the Telerik Winform Controls ,  I need some help to design the MainForm and Flash Screen which is similar
to what we see in Live Demo Screen of RadControls Of WinForms But in my case there will be only few forms and i want follow the apporach what used in Live Demo

Thanks In Advance
Regards
Vinodh
Vassil Petev
Telerik team
 answered on 18 Jun 2009
1 answer
293 views
I am using radgridview.It has the Chekcbox colmn.I need to get only the Checked rows from the grid i.e. the rows which are cheked in the grid .Please help me..
gerbrand
Top achievements
Rank 2
 answered on 18 Jun 2009
4 answers
162 views

Hi,
I'm trying to use a button to clear the results in my grid (see example below) and it works fine except for when I have focus on a child element of an expanded row.  If the focus is on any row that isn't a child then the clear button works without issue.  The error is "Object reference not set to an instance of an object."  for grdResults.DataSource.  where grdResults is the Telerik.WinControls.UI.RadGridView

private void cmdClear_Click(object sender, EventArgs e)
        {
             grdResults.DataSource = null;
        }

If the focus is on a child element when the clear button is clicked do I need to change focus to a non-child row and then set the DataSource to null?

Thanks,
Jeremy
Jeremy Murtishaw
Top achievements
Rank 1
 answered on 17 Jun 2009
3 answers
284 views
Hello,
I am attempting to add an image button to each row in the grid.  I have found a couple of old posts that detailed exactly what I am trying to do.  However, when I tried to implement the code I am getting an "Out of Memory" error.  The image that I am trying to load is only 2 KB, and the exception occurs on the first row in the gird, so I wouldn't think this would be an issue.  I can successfully load the image to a Picturebox control on the form without a problem.

In the Form_Load event, I call this method to load the image:

Private Sub LoadAppImages()  
        Dim myAssembly As System.Reflection.Assembly 
        Dim myNamespace As String 
        Dim fileName As String 
 
        myAssembly = System.Reflection.Assembly.GetEntryAssembly  
        myNamespace = myAssembly.GetName.Name  
 
        
        fileName = myNamespace & ".tool_dropdown.png" 
 
        Using stream As System.IO.Stream = myAssembly.GetManifestResourceStream(fileName)  
 
            If stream IsNot Nothing Then 
                _toolsIcon = Image.FromStream(stream)  
            End If 
 
            stream.Close()  
 
        End Using  
 
    End Sub 

Then in the CellFormatting event, I configure the image button:

Private Sub rgLines_CellFormatting(ByVal sender As ObjectByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles rgLines.CellFormatting  
          
        If TypeOf (e.CellElement.ColumnInfo) Is GridViewDataColumn AndAlso _  
            Not TypeOf (e.CellElement.RowElement) Is GridTableHeaderRowElement Then 
 
            Dim column As GridViewDataColumn = CType(e.CellElement.ColumnInfo, GridViewDataColumn)  
 
            If column.FieldName = "TOOLS" Then 
 
                'Check to see if the button has already been added   
                If e.CellElement.Children.Count > 0 Then 
 
                    Exit Sub 
 
                End If 
 
                Dim toolsButton As New RadImageButtonElement  
 
                toolsButton.DisplayStyle = DisplayStyle.Image  
                toolsButton.Image = _toolsIcon  
 
                e.CellElement.Children.Add(toolsButton)  
                ApplyThemeToElement(toolsButton, "ControlDefault")  
 
            End If 
 
        End If 
 
    End Sub 

The error occurs when I call "e.CellElement.Children.Add(toolsButton)". 

Here is the full Stack Trace.  Any ideas what I may be doing wrong?

System.Reflection.TargetInvocationException was unhandled
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       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 WinFormQuotesGrid.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()
  InnerException: System.OutOfMemoryException
       Message="Out of memory."
       Source="System.Drawing"
       StackTrace:
            at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
            at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)
            at System.Drawing.Bitmap.MakeTransparent(Color transparentColor)
            at Telerik.WinControls.Primitives.ImagePrimitive.get_Image()
            at Telerik.WinControls.Primitives.ImagePrimitive.OnPropertyChanged(RadPropertyChangedEventArgs e)
            at Telerik.WinControls.RadObject.UpdateEffectiveValue(RadProperty dp, RadPropertyMetadata metadata, Boolean isCoerceValue, Boolean isOldValueValid, Object oldValue, ValueSource oldValueSource, Boolean oldValueIsDeferred, Boolean coerceWithDeferredReference)
            at Telerik.WinControls.RadObject.SetValueCommon(RadProperty dp, Object value, RadPropertyMetadata metadata, Boolean coerceWithDeferredReference)
            at Telerik.WinControls.RadObject.SetValue(RadProperty dp, Object value)
            at Telerik.WinControls.RadObject.BindProperty(RadProperty myProperty, RadObject bindingSourceObject, RadProperty bindingSourceProperty, PropertyBindingOptions propertyBindingOptions)
            at Telerik.WinControls.UI.RadButtonElement.CreateChildElements()
            at Telerik.WinControls.RadElement.EnsureChildElements()
            at Telerik.WinControls.RadElement.InvalidateTotalTransformationReqursively()
            at Telerik.WinControls.RadElement.InvalidateTransformations(Boolean invalidateElement)
            at Telerik.WinControls.RadElement.ChangeCollection(RadElement child, ItemsChangeOperation changeOperation)
            at Telerik.WinControls.RadElementCollection.OnInsertComplete(Int32 index, Object value)
            at System.Collections.CollectionBase.System.Collections.IList.Insert(Int32 index, Object value)
            at Telerik.WinControls.RadElementCollection.Insert(Int32 index, RadElement value)
            at WinFormQuotesGrid.Form1.rgLines_CellFormatting(Object sender, CellFormattingEventArgs e) in C:\projects\ProjectQuote\WinFormQuotesGrid\WinFormQuotesGrid\Form1.vb:line 166
            at Telerik.WinControls.UI.RadGridView.OnCellFormatting(Object sender, CellFormattingEventArgs e)
            at Telerik.WinControls.UI.RadGridView.CallCellFormatting(Object sender, CellFormattingEventArgs e)
            at Telerik.WinControls.UI.GridDataRowElement.UpdateInfo()
            at Telerik.WinControls.UI.GridRowElement.Initialize(GridViewRowInfo rowInfo)
            at Telerik.WinControls.UI.GridTableBodyElement.UpdateRow(Int32 position, GridViewRowInfo rowInfo)
            at Telerik.WinControls.UI.GridTableBodyElement.UpdateRowElements(IEnumerable`1 rows, RectangleF clientRect, Single& y, Int32& position, Int32 startIndex, Int32& added, Single left, Single width)
            at Telerik.WinControls.UI.GridTableBodyElement.ArrangeOverride(SizeF finalSize)
            at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
            at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
            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.Layouts.ContextLayoutManager.UpdateLayoutCallback(ILayoutManager manager)
       InnerException:


Victor
Telerik team
 answered on 17 Jun 2009
7 answers
1.6K+ views
Hi.
I have a Rad button with an image.
I want to set 'hover' image and 'click' image.

What is the best way to do so?
Martin Vasilev
Telerik team
 answered on 17 Jun 2009
1 answer
121 views

When I call

window.DockManager.ActiveWindow = window;

this activates the DocumentWindow in the Manager, but it paints itself correctly only if the tab of the DocumentWindow was already visible on the TabStrip.

If the tab is not visible (too many open documents), I get an empty window with no contents.

If I activate the window through the drop-down menu, it is inserted to the beginning of the TabStrip and thus shown
correctly.

regards
Erwin

 

 

 

 

Julian Benkov
Telerik team
 answered on 17 Jun 2009
6 answers
139 views

What's the best way to convert UserDockForm derived Dockables to the new DocumentWindow?

Do I have to convert them to Controls and then add them to the DocumentWindow.Controls Collection?

regards
Erwin
Julian Benkov
Telerik team
 answered on 17 Jun 2009
1 answer
88 views
Hi,

I am developing a web application with telerik controls. I am using the radGrid in the application. I am facing a weird  problem with new version of Telerik.Web.UI.dll. The version which I am using is 2009.1.527.20.

Problem Description:
When the grid width is 50% of the screen width then the paging controls (like Page size and Change button ) are displaying out side grid control. It was not happening with the telerik version 2008.3.........

Please provide the solution.

Thanks
Hari

Pavlina
Telerik team
 answered on 17 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?