Telerik Forums
UI for WinForms Forum
5 answers
144 views
When more than six column names appear in Column Chooser, background text is obscured, because label is always in the middle. Can it be moved somehow? The screenshot is attached.
Thank you
Richard Slade
Top achievements
Rank 2
 answered on 09 Feb 2011
5 answers
208 views

I want to click on one cell in the grid view to get a whole column on another form related to one single cell,,

 

For example:

 

If I had a database which have products table and product details table,,

In my grid view I want to click on one product (cell) to get the details for that  product in separate form which contains another grid view.
the details will be column in another table in the database. 

 

Thanks in advance,,

Richard Slade
Top achievements
Rank 2
 answered on 09 Feb 2011
6 answers
510 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
257 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
246 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
280 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
175 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
450 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
161 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
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?