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

I have a very simple question, how to add new row to radgridview properly ?
I need to add new row from clicking on my button, and begin edit it.

OK, let me describe what is ugly from my point of view.

I have binding source connected with gridview. Here is my buttonClick event handler:
 private void button1_Click(object sender, EventArgs e)  
        {  
            bindingSource1.AddNew();  
            radGridView2.Rows[radGridView2.Rows.Count - 1].Cells[1].BeginEdit();  
        } 

If
 
radGridView2.MasterGridViewTemplate.AllowAddNewRow = true

everything is OK, but if
radGridView2.MasterGridViewTemplate.AllowAddNewRow = false

behavior is ugly. Clicking first time, I'm getting new row selected, but not in edit mode, clicking one more and getting second row selected but not in edit mode (two rows selected !), and finally clicking one more time, I'm getting new row in  edit mode.

I need to add new rows, but don't need "Click here to add new row" label (functionality)

Thank you.
Nick
Telerik team
 answered on 15 Oct 2008
5 answers
766 views
Hi, 

I am facing a problem in cell formatting event of my radGridView. Formating cell in this event is making my Grid's scrolling very slow, is there any event that I can use instead of cell formatting that would fire each time after grid bind as cell formatting fires each time after I scroll my grid, and this is making my scrolling slow. 

Or is there any other way in which i can change the value of my cell. 

Regards,
Shweta Garg
 
Jack
Telerik team
 answered on 15 Oct 2008
3 answers
121 views
Hi,

when I Cancel closing of DocumentPane in Cancel event handler, it is canceled, but then it has "very interesting" behavior. When I click on another Tab of DockingManager, sometimes the DocumentPane stays in DockingManager and sometimes it disappears.

Could you check it, please?

2nd issue: how can I check if the closing was successful, when I call the Close method programatically? Could you change void Close method to it returns bool, if it was/was not closed?

TIA
Jaroslav Bucek
Julian Benkov
Telerik team
 answered on 15 Oct 2008
3 answers
128 views
Hello,

I have an MDI App using a DockingManager. The DockingManager is in the main Form. Rather than using AutoDetectChildForms and create DocumentPanes automatically by MDIChild Forms additions to the main Form, I prefer using custom DocumentPanes that I add programmatically to the DockingManager (because the AutoDetectChildForms feature clears the main Form's MDIChildren collection, and its a pity).

It works well... But !... any RadGridView designed on a custom DocumentPane doesn't fill with datas and doesn't display anything. (Even with this simple sample, 
List<string> myList = new List<string>();
myList.Add(
"One");
myList.Add(
"Two");
myList.Add(
"Three");
radGridView1.DataSource = myList;
)

Of course, I checked that the program does execute the lines above, the DataSource is well defined but the grid doesn't display anything. If I put the grid on a simple form, it works, of course.

What's going wrong with that ?!
Julian Benkov
Telerik team
 answered on 14 Oct 2008
1 answer
58 views
When we are adding a colum in gridview its visible like a  simple column in grid.
Can we show as textbox clearly in gridview as we show in ASP Grid?
If so how?
I have tried cellfomatting and rowformatting, but its not upto the mark.
Please suggest me how can we achive this.

Regards,
Narendra P 
Nick
Telerik team
 answered on 14 Oct 2008
1 answer
155 views
Telerik team,

I was hoping someone could assist me with a problem I am having?
I currently have a radlistbox that I am using as a log window, which is working and looking very well until now. It seems that all the radlistbox items inside all have to be the same height. for example if I log a simple "hello" looks great but if i add another item into the listbox that says     "hello" [newline]
                                                                    "how" [newline]
                                                                    "are" [newline]
                                                                     "you"
the second item is now the same size as the first one.
This comes as a big problem when trying to log exception data and stacktraces.

Any help would be appreciated, thank you.

Todd Kueny
   
Angel
Telerik team
 answered on 14 Oct 2008
2 answers
123 views
I am experiencing an issue with RadTreeView giving me an error in Visual Studio that is to the effect of the following:

System.ArgumentException "Control does not support transparent background colors."

I have a split container control, which is a slider control that allows me to resize the panel that contains the RadTreeView. I notice whenever I resize the panel so that the text on a node is not visible, this exception will appear. Here is the stack trace from the error:



   at System.Windows.Forms.Control.set_BackColor(Color value)
   at Telerik.WinControls.UI.RadTreeView.InitializeBlankSpot()
   at Telerik.WinControls.UI.RadTreeView.InitializeUIElements()
   at Telerik.WinControls.UI.RadTreeView.OnLayout(LayoutEventArgs args)
   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.OnResize(EventArgs e)
   at Telerik.WinControls.UI.RadTreeView.OnResize(EventArgs e)
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at Telerik.WinControls.UI.RadTreeView.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   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.SafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CallSetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at Telerik.WinControls.ComponentLayoutElementTree.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at Telerik.WinControls.RadControl.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
   at System.Windows.Forms.Layout.DefaultLayout.ApplyCachedBounds(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.PerformLayout()
   at DevExpress.XtraEditors.PanelControl.OnGroupLayout()
   at DevExpress.XtraEditors.PanelControl.CheckInfoCore(GroupObjectInfoArgs info)
   at DevExpress.XtraEditors.PanelControl.CheckInfo()
   at DevExpress.XtraEditors.SplitGroupPanel.OnResize(EventArgs e)
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at DevExpress.Utils.Controls.PanelBase.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.SafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.set_Bounds(Rectangle value)
   at DevExpress.XtraEditors.SplitGroupPanel.UpdateBounds(Rectangle bounds)
   at DevExpress.XtraEditors.SplitContainerControl.UpdateDockPosition()
   at DevExpress.XtraEditors.SplitContainerControl.set_SplitterPosition(Int32 value)
   at DevExpress.XtraEditors.Drawing.SplitContainerSplitter.StopSplit(Boolean resize)
   at DevExpress.XtraEditors.Drawing.SplitContainerSplitter.CheckMouseUp(Point point)
   at DevExpress.XtraEditors.SplitContainerControl.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 DevExpress.Utils.Controls.PanelBase.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(Form mainForm)

I am unsure if there is a value in text that I have not yet but I'm sure it isn't. I notice the tree automatically gives me a vertical scroll bar and I can scroll up and down without any issues. Maybe this issue can be resolved if I can implement a horizontal scroll bar in my application whenever the panel is resized?

Your help is greatly appreciated, thank you
~Kenyatta
Kenyatta
Top achievements
Rank 1
 answered on 13 Oct 2008
1 answer
106 views
Dear All,

Can any one tell me how to have the theme in the Resource and use it?

Thanks a lot in advance.
Vassil Petev
Telerik team
 answered on 13 Oct 2008
10 answers
221 views
Hi

I am new to the radGridView windows control, may I ask a couple of questions?

1. I have a data source of 20 columns/properties, but i only require to display 5 of them in the grid. I have manually added the columns that I require to the grid. When binding to the data source all of the remaining columns are loaded as well, how can I stop this auto generation of columns?

2. In the Property Builder design view of the grid I, have created a view and added the required columns. Can I add another view and add another set of columns (all from the same data source)?

Thanks

P
Paul Gallen
Top achievements
Rank 1
 answered on 13 Oct 2008
1 answer
129 views
Dear All,

Actually, I have an application, which will configure the grid settings.

After all the configuration, it has to show the preview of the grid.

For this I am creating a sample data set in the application and binding the same to the grid.

It also has a Image column and for this image has to be taken from the application and a tool tip has to be from the other field.

Can any one tell me to achieve this?
 
Thanks a lot in advance.




Nick
Telerik team
 answered on 13 Oct 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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?