Telerik Forums
UI for WinForms Forum
5 answers
230 views
hi!
How can i access to the cells text of grid view NewRow .

Please see this Picture

also notice to follow block code,please:

private void radGridView1_RowValidating(object sender, RowValidatingEventArgs e)
{
    if (e.Row != null && e.RowIndex == -1 && e.Row.Cells["column1"].CellElement != null)
    {
        MessageBox.Show(e.Row.Cells["column1"].CellElement.Text);
    }
}

if RowValidating event raised with the keyboard the MessageBox show nothing but if the event raised by click on other rows MessageBox show the cell text.
Alexander
Telerik team
 answered on 09 Feb 2011
24 answers
1.3K+ views
Hi,

I'm using version 2010.2.10.914 and a databounded hierarchy gridview.  What I need to do is to be able to edit a quantity in a child row and then based on the new value update the parent row cost.  An overview of what I'm trying to do:

Parent row has 3 columns: Name, Qty, and Cost.  The cost is the sum on the parts in the child row and when the Qty is changed then it affects the child row Qty and Cost. 

The child row has 3 columns: Part, Qty, Cost. Now what I'm trying to do is change the Qty in the child row and adjust the child cost and the parent cost.  So in the CellEndEdit event, I update the child row, but when I add this line:

e.Row.ViewInfo.ParentRow.Cells["Cost"].Value 
            = (decimal)e.Row.ViewInfo.ParentRow.Cells["Cost"].Value   + newChildCost - oldChildCost;

I get a NullReferenceException "Object reference not set to an instance of an object." when the CellEndEdit event method ends (not on the added line).  When I step thru the code, everything seems to be ok until the end of the method.

Any idea why the error is occurring, is there a better way to synchronize values from the child rows to parent rows? 

Thank you,
Aaron
Jack
Telerik team
 answered on 09 Feb 2011
3 answers
271 views
Hi

My Grid has a multiline header. So I set AutoSizeRows = true. And set the WrapText = true.

But after this my grid is not formatting properly. I am attaching 2 screen shots. Look the last row in the screen shot. Sometimes this abnormality is just with 1 row or sometimes with many (noted: I have seen this when there are many rows and there is a scrollbar). If I AutoSizeRows = false, my grid is formatting properly but obviously height of the header is small to fit the 2 line header text.

What am I missing? Any solution? I reproduced this problem by setting  AutoSizeRows = true of some other grid in application.

Thanks

Regards
Alexander
Telerik team
 answered on 09 Feb 2011
2 answers
160 views
I am using Q3 2010 Telerik Winforms.

My RadGridViews worked fine before the latest upgrade, but since I implemented Q3 2010 my Gridview Rows get mixed up when scrolling initially (As per image attached).
Any Idea?

'DGLumpsumHours
        '
        Me.DGLumpsumHours.AutoSizeRows = True
        Me.DGLumpsumHours.BackColor = System.Drawing.Color.White
        Me.DGLumpsumHours.Cursor = System.Windows.Forms.Cursors.Default
        Me.DGLumpsumHours.Dock = System.Windows.Forms.DockStyle.Fill
        Me.DGLumpsumHours.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
        Me.DGLumpsumHours.ForeColor = System.Drawing.SystemColors.ControlText
        Me.DGLumpsumHours.HideSelection = True
        Me.DGLumpsumHours.ImeMode = System.Windows.Forms.ImeMode.NoControl
        Me.DGLumpsumHours.Location = New System.Drawing.Point(10, 20)
        '
        'DGLumpsumHours
        '
        Me.DGLumpsumHours.MasterTemplate.AllowAddNewRow = False
        Me.DGLumpsumHours.MasterTemplate.AllowDeleteRow = False
        Me.DGLumpsumHours.MasterTemplate.AllowEditRow = False
        Me.DGLumpsumHours.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
        Me.DGLumpsumHours.MasterTemplate.EnableGrouping = False
        Me.DGLumpsumHours.MasterTemplate.ShowRowHeaderColumn = False
        Me.DGLumpsumHours.Name = "DGLumpsumHours"
        Me.DGLumpsumHours.ReadOnly = True
        Me.DGLumpsumHours.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.DGLumpsumHours.ShowGroupPanel = False
        Me.DGLumpsumHours.Size = New System.Drawing.Size(261, 223)
        Me.DGLumpsumHours.TabIndex = 2
        Me.DGLumpsumHours.Text = "radGridViewPreview"
        Me.DGLumpsumHours.ThemeName = "Office2007Silver"
        CType(Me.DGLumpsumHours.GetChildAt(0), Telerik.WinControls.UI.RadGridViewElement).Text = "No data to display"
        CType(Me.DGLumpsumHours.GetChildAt(0), Telerik.WinControls.UI.RadGridViewElement).Padding = New System.Windows.Forms.Padding(0)
        '


it is loaded from a SQLDataReader

DGLumpsumHours.LoadFrom(drRecordDetail)
Alexander
Telerik team
 answered on 09 Feb 2011
6 answers
435 views
Does anyone have an example of how to bind a TreeView to a BindingList or preferably if possible to a BindingSource? I have tried both, and just cannot seem to get it to work right. Thanks in advanced!!!
Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
1 answer
158 views
All,

after upgrading to the latest control versions of Telerik all of my comboboxes in the ribbonbar got ugly somehow.

Please see the screenshot attached for reference.

I didn't touch anything and even if I create a new dropdown in the ribbon it looks the same way

here is the Designer code for this particular control. Please note that I am using the Office2010 theme.

Me.cmbReferenceWeek.ArrowButtonMinWidth = 16
Me.cmbReferenceWeek.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cmbReferenceWeek.AutoSize = False
Me.cmbReferenceWeek.Bounds = New System.Drawing.Rectangle(0, 0, 100, 22)
Me.cmbReferenceWeek.DefaultValue = Nothing
Me.cmbReferenceWeek.EditorElement = Me.cmbReferenceWeek
Me.cmbReferenceWeek.EditorManager = Nothing
Me.cmbReferenceWeek.Focusable = True
Me.cmbReferenceWeek.FormattingEnabled = True
Me.cmbReferenceWeek.MaxValue = Nothing
Me.cmbReferenceWeek.MinSize = New System.Drawing.Size(140, 0)
Me.cmbReferenceWeek.MinValue = Nothing
Me.cmbReferenceWeek.Name = "cmbReferenceWeek"
Me.cmbReferenceWeek.NullTextColor = System.Drawing.SystemColors.GrayText
Me.cmbReferenceWeek.NullValue = Nothing
Me.cmbReferenceWeek.OwnerOffset = 0
Me.cmbReferenceWeek.StretchVertically = False
Me.cmbReferenceWeek.Text = ""
Me.cmbReferenceWeek.Value = Nothing
Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
1 answer
210 views
Hello. I need to know if it is possible for me to somehow disable certain weekdays (Mon - Sun) on the RadCalendar?
Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
2 answers
1.1K+ views
HI

Here, I have a radgridview contains two columns 'Debit' and 'Credit' ,both column contains Decimal values...
And at the end of Form ,there are two Labels ready to display sum of 'Debit' and 'Credit' columns...
let me know, How it is possible???
AND
when user add/delete rows  with 'Debit' and 'Credit' values,the Sum of column Should be changed....
Please suggest me any solution....

Thank You
Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
5 answers
186 views
Hi there,

since the newest release the ColumnChooserFormMessage ist centered and not at the bottom of the Form. Is there a way to put the message back to the bottom?

Best regards,
Alexander
Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
3 answers
172 views

Hello!

If I create a simple RadForm with a single RadTextBox, this text box is selected (gets input focus and shows cursor) automatically when the form is shown. If I create a simple RadForm with a RadPageView and place the RadTextBox into the page, it is not selected automatically when the form is shown.

Even the following code does not select the text box:

protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
 
    radTextBox1.Focus();
    radTextBox1.Select(0, 0);
}

The following workaround does work, but I do not think this is a way I should go:

protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
 
    Application.Idle += Application_Idle;
}
 
void Application_Idle(object sender, EventArgs e)
{
    Application.Idle -= Application_Idle;
    radTextBox1.Focus();
    radTextBox1.Select(0, 0);
}

So, how should I correctly select the text box in the PageView page when the form is shown?

Thank you.

Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?