Telerik Forums
UI for WinForms Forum
6 answers
403 views
Hi,
i have a sub menu items in one of the menu items in context menu,but the problem is that submenu item doesnt get highlited or respond until i explicitly click on its parent item.
Is there any possibility that i take mouse on the parent menu item and its children gets highlited,
i dont want to click the parent to gets its children enabled.

Dobry Zranchev
Telerik team
 answered on 09 Feb 2011
7 answers
173 views
I have a GridView with a GridViewComboBoxColumn for choosing units of measure.  My grid is bound to a DataTable of parts data.  One of the fields for a part is 'unit of measure' but it is not a required field.  I am using the Excel-like filtering. If I have a null value in the 'unit of measure' field and I click the filter icon, I get an exception that says: "Object reference not set to an instance of an object.".  This only happens when I have a null value for that field in one or more rows. Here is part of the stack trace that seems to indicate that the error happens during the attempt to get the column's distinct values.

A first chance exception of type 'System.NullReferenceException' occurred in Telerik.WinControls.GridView.dll System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinControls.UI.RadListFilterMenuProvider.GetDistinctValuesTable(GridViewDataColumn column)
at Telerik.WinControls.UI.RadListFilterMenuProvider.CreateListFilterMenuItems()
at Telerik.WinControls.UI.RadListFilterMenuProvider.CreateFilterMenu()
at Telerik.WinControls.UI.GridHeaderCellElement.FilterFunctionButton_Click(Object sender, EventArgs e)...


Should I be able to have null values in a field bound to a GridViewComboBoxColumn and expect filtering to work properly?

Here are the properties I have set on the grid:
gridCatalog.AllowCellContextMenu = false;
gridCatalog.AllowDeleteRow = false;
gridCatalog.AutoGenerateColumns = false;
gridCatalog.EnableFiltering = true;            
gridCatalog.EnableGrouping = false;
gridCatalog.NewRowEnterKeyMode = RadGridViewNewRowEnterKeyMode.EnterMovesToNextCell;
gridCatalog.EnableCustomSorting = false;
gridCatalog.EnableSorting = true;
gridCatalog.MasterTemplate.SelectLastAddedRow = false;
gridCatalog.MasterTemplate.EnableCustomSorting = false;
gridCatalog.MasterTemplate.EnableSorting = true;
gridCatalog.MasterTemplate.ShowHeaderCellButtons = true;
gridCatalog.MasterTemplate.ShowFilteringRow = false;

I am creating the column like this:
var UOMs = from a in dc.vw_UnitOfMeasureLUs
           orderby a.UnitOfMeasureName
           select a;
GridViewComboBoxColumn colUOM = new GridViewComboBoxColumn();
colUOM.DisplayMember = "UnitOfMeasureName";
colUOM.ValueMember = "UnitOfMeasureID";
colUOM.FieldName = "UnitOfMeasureID";
colUOM.Name = "UnitOfMeasure";
colUOM.HeaderText = "UOM";                
colUOM.Width = 80;
colUOM.DataSource = UOMs;
colUOM.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
gridCatalog.MasterTemplate.Columns.Add(colUOM);

Am I doing something wrong or is this expected behavior? 

I would appreciate any help anyone out there has to offer.

Thanks
Martin Vasilev
Telerik team
 answered on 09 Feb 2011
5 answers
189 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.2K+ 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
209 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
118 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
339 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
115 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
130 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.0K+ 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
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?