Telerik Forums
UI for WinForms Forum
0 answers
120 views

I have a radgridview with 3 columns, one of which is a gridviewlookupcolumn.
The data is populated using LinqToSql classes as followingf

 

DataClasses2DataContext

 

 

dcl = new DataClasses2DataContext();

 

 

 

 

GridViewLookUpColumn gvc = new GridViewLookUpColumn("SuitabilityIndex1");

 

 

 

radGridView1.DataSource = dcl.USBDevices;

 

radGridView1.Columns[

 

"Id"].IsVisible = false;

 

radGridView1.Columns[

 

"SuitabilityIndex"].IsVisible = false;

 

radGridView1.Columns[

 

"Manufacturer"].StretchVertically = true;

 

 

System.Collections.Generic.

 

List<short> dd = new List<short>();

 

dd.Add(0);

dd.Add(1);

dd.Add(2);

gvc.DataSource = dd;

 

radGridView1.Columns.Add(gvc);

radGridView1.Columns[

 

"SuitabilityIndex1"].FieldName = "SuitabilityIndex";

The field SuitabilityIndex in the database is smallInt that allows null. The datasource for the lookup column is short

When I change the value in the lookup column, it fires the data error event with the following error

 

{Telerik.WinControls.UI.GridViewDataErrorEventArgs}

base {Telerik.WinControls.UI.GridViewCellCancelEventArgs}: {Telerik.WinControls.UI.GridViewDataErrorEventArgs}

Context: Commit

Exception: {"Object of type 'System.String' cannot be converted to type 'System.Nullable`1[System.Int16]'."}

ThrowException: false

I think the problem is that the lookupcolumn thinks that the datatype os string. I can say that for sure since the allignmnet of values on the grid are to the left and not to the right.
I tried setting the datatype of the column to short, but did not help

 

 

Thanks
Deepak

 

 

Deepak Rao
Top achievements
Rank 1
 asked on 14 Jan 2010
1 answer
80 views
Hi,
I am trying to add a RadMaskedEditBoxElement in RadRibbonBarButtonGroup on the ribbonBar. I am fine with adding it but when i am trying to set the mask value , the mask does not exists. All the properties of the RadMaskedEditBoxElement are like  radtextbox. On the other hand when i am adding the RadMaskedEditBoxElement on winform it works perfectly.

I tried to add the RadMaskedEditBoxElement from the code with a host element , nothing.

Can you help me ?
Deyan
Telerik team
 answered on 14 Jan 2010
1 answer
228 views
I have created a hieriachry node system as shown in your examples.    However, I wish the datamember in the last node to be made up to 2 fields from the DB.  How can this be done?

I also have a gridview which I wish to show the same hieriachy data that is in sync with the treeview. 

Your assistance will be appreciated.
Victor
Telerik team
 answered on 14 Jan 2010
3 answers
230 views
Even though I can change using Inherited form, I was wondring if there is a way to completely disable it and replace it with my own form that would update the SQL tables directly (along with other things in the database). My question is about disabling the edit dialog and relacing it with my own...  If you happend to provide examples, would you please provide VB.net?

Thanks
 
Boyko Markov
Telerik team
 answered on 14 Jan 2010
0 answers
116 views
Good morning,

I am creating gridviews programmatically but the TAB key is not functioning within the gridviews. When I click the tab key it either does nothing or, if the controls is in edit mode, it just highlights the entire value within the control. How do I get the TAB key to jump between cells?

RadGridView gridView = new RadGridView();  
gridView.Name = name;  
gridView.Anchor = (System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);  
gridView.AutoSize = true;  
gridView.AutoScroll = true;  
gridView.MasterGridViewTemplate.BestFitColumns();  
//gridView.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;  
gridView.MasterGridViewTemplate.AutoGenerateColumns = false;  
gridView.MasterGridViewTemplate.AllowAddNewRow = true;  
gridView.ShowGroupPanel = false;  
gridView.ContextMenuOpening += new ContextMenuOpeningEventHandler(gridView_ContextMenuOpening);  
gridView.GridBehavior = new MyBehavior(); // see behavior below  
gridView.CellBeginEdit += new GridViewCellCancelEventHandler(gridView_CellBeginEdit);  
gridView.CellValueChanged += new GridViewCellEventHandler(gridView_CellValueChanged);  
gridView.StandardTab = true;  
 

I've tried the "StandardTab" property set to true and false, neither of them work.

Thank you,
Scott Vercuski
Scott
Top achievements
Rank 1
 asked on 13 Jan 2010
2 answers
112 views
How can disable DatePickerDateTimeShower or how can selecting automatic date without clicking the control DatePickerDateTimeShower

Regards
Jose Monerto
Top achievements
Rank 1
 answered on 13 Jan 2010
1 answer
68 views

Hi,

We have a problem with the rendering of the grid(version 2009.3.9.1203) since we upgrade to version 2009 Q3.

He is the code we use to set the columns width :

 

 

Me.Instance.DataSource = Value

 

 

Me.Instance.GridElement.BeginUpdate()

 

 

 If Me.Instance.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None Then

 

 

 

   For Each column As GridViewDataColumn In Me.Instance.Columns

 

      column.BestFit()

 

   Next

 

 

 

End If
Me.Instance.GridElement.EndUpdate()

Since we update, the column.BestFit() don't work and all column have like width of 1...? We usually have grid with more than 10 columns and it has always work fine.

What should we do to fix it?

thx

 

Martin Vasilev
Telerik team
 answered on 13 Jan 2010
7 answers
416 views
Hello.

Default behaviour for a radgridview is to scroll one whole "page" when using the mousewheel to scroll, however I would like to change this to something like 5 rows at a time. Is this possible?

Best Regards, Joel
Nikolay
Telerik team
 answered on 13 Jan 2010
3 answers
314 views
How to insert a Radion Button Column in radGridview in Windows form?.
Nikolay
Telerik team
 answered on 13 Jan 2010
2 answers
109 views
Hi all,

I was wondering if there's a way to resize the treeview checkboxes - I am changing an application to be used with a touchscreen, and the current checkbox is too small to click using your finger. Anyone has any advice?

Thanks.
Eyal R
Top achievements
Rank 1
 answered on 13 Jan 2010
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
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?