Telerik Forums
UI for WinForms Forum
4 answers
255 views
Is it possible to define different GridView column type based on column value at row loading event at runtime?
I like to be able to define calendar, combo, or text in the same column.

For example, I have following records:
Col1        Col2            Col3
Daily        10/1/2010    Check my email
Weekly    Monday        Check to see if weekly backup worked
Monthly    1                  Check to see if monthly order came thru

I like to be able to change cell column type on Col2 based on value in Col1.
So, in this case,
Col2 on the 1st row has GridViewDataTimeColumn where a user can select date from calendar. 
Col2 on the 2nd row has combo box with monday, tuesday, wednesday, etc...
Col3 on the 3rd row has free text where a user can enter numerical number 1 thru 31

So, Col1 is defined as combo box with Daily, Weekly, Monthly, etc...

Is this possible to do this using your radgridview?

Thanks.

Harry Idachi

Svett
Telerik team
 answered on 05 Oct 2010
3 answers
272 views
Hi Guys,

The column format is set as {0:c},

From the designer, I add a summary row, and then a GridViewSummaryItem. When I set the FormatString property of this summary item for that particular column as {0,c}, I am getting an exception.

The actual DB column is a MySQL decimal (15,2) type column.

I can get around this by using the ViewCellFormattingEvent programmatically. But just wanted to know whether I am doing something wrong, or is this a bug.

Thanks.
Emanuel Varga
Top achievements
Rank 1
 answered on 05 Oct 2010
0 answers
95 views
Please, remove this post. I moved it to Gridview forum. This was wrong place. Sorry!

Hi! 
I am trying to implement GridViewComboBoxColumn on gridview for existing"DEPARTMENT_ID"
colum.
I tried below and it works fine, but it is adding another column on the gridview instead of replacing existing "DEPARTMENT_ID" column.
1. What should I change?
2. What property will remove a scroll bar on GridViewComboBoxColumn?

 
 With Me.rgvEmployee
            .Columns("EMP_ID").HeaderText = "EMP ID"

            Dim deptComboboxColumn As GridViewComboBoxColumn = New GridViewComboBoxColumn
            With deptComboboxColumn
                .UniqueName = "DeptColumn"
                .HeaderText = "Dept"
                .DataSource = From q In db.MST_DEPARTMENT _
                              Select q.DEPARTMENT_ID, q.DEPARTMENT_NM
                .ValueMember = "DEPARTMENT_ID"
                .DisplayMember = "DEPARTMENT_NM"
                .FieldName = "DEPARTMENT_ID"
                .Width = 200
            End With
            Me.rgvEmployee.Columns.Add(deptComboboxColumn)

        End With
Won
Top achievements
Rank 1
 asked on 05 Oct 2010
1 answer
308 views
Hi,

I want to create a checkbox column in my grid which will be databound to a nullable boolean property in the data source.  How do I go about doing this?  I don't see an IsThreeState property on GridViewCheckBoxColumn or RadCheckBoxEditor.


Thanks!
Emanuel Varga
Top achievements
Rank 1
 answered on 04 Oct 2010
8 answers
391 views
Hi have been looking around for quite some time now and I cannot find exactly what I want.

I have a GridView (Q2 2010), I group some rows programmatically.

Now I need to display sub-totals and the grand-total for 3 columns. I have only been able to display the 3 sub-totals on different lines.

What is the the correct way of adding sub-totals (based on grouping) for the 3 columns on the same line?

How to add the Grand-total line for those 3 columns?

All this is set programmatically.
Martin Vasilev
Telerik team
 answered on 04 Oct 2010
1 answer
99 views
Hi:
I'm developing a application with a version of rad forms telerik from 2009, but I want to install a new version.
My question is: The new version is compatible with all controls of the old version?

Thanks.
Nikolay
Telerik team
 answered on 04 Oct 2010
2 answers
165 views

Problem with comb box column if data source is List<T>, 2010 Q2 SP2.

Hi

I set (radGridView1.Columns[0] as GridViewComboBoxColumn).DataSource on List<MyObject>.
During moving focus to another cell (after selecting something from combo box) I get exception.
DisplayMemeber and ValueMember are null – but I think it is ok for this case.


Stack trace:

 

FormatException: Input string was not in a correct format.

   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

   at System.String.System.IConvertible.ToInt32(IFormatProvider provider)

   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)

   at System.ComponentModel.BaseNumberConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)

   at Telerik.WinControls.UI.RadDataConverter.ParseCore(Object value, Type targetType, Type sourceType, TypeConverter dataTypeConverter, IDataConversionInfoProvider dataColumn, Boolean checkFormattedNullValue)

   at Telerik.WinControls.UI.RadDataConverter.Parse(IDataConversionInfoProvider converstionInfoProvider, Object value)

   at Telerik.WinControls.UI.GridDataCellElement.set_Value(Object value)

   at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)

   at Telerik.WinControls.UI.GridViewEditManager.CloseEditor()

   at Telerik.WinControls.UI.GridViewEditManager.OnPositionChanging(PositionChangingEventArgs args)

   at Telerik.WinControls.UI.GridViewEditManager.Telerik.WinControls.UI.IGridViewEventListener.PreProcessEvent(GridViewEvent eventData)

   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)

   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)

   at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)

   at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()

   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)

   at Telerik.WinControls.UI.GridViewSynchronizationService.RaiseCurrentChanged(GridViewTemplate template, GridViewRowInfo row, GridViewColumn column, Boolean user)

   at Telerik.WinControls.UI.BaseGridNavigator.SelectCore(GridViewRowInfo row, GridViewColumn column)

   at Telerik.WinControls.UI.BaseGridNavigator.SelectNextColumn()

   at Telerik.WinControls.UI.GridRowBehavior.ProcessTabKey(KeyEventArgs keys)

   at Telerik.WinControls.UI.GridNewRowBehavior.ProcessTabKey(KeyEventArgs keys)

   at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)

   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)

   at Telerik.WinControls.UI.RadGridView.ProcessDialogKey(Keys keyData)

   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)

   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)

   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)



I do not have this problem if I set DataSource to List<string>.

How can I set List< MyObject> as DataSource for comb box column?

Regards

Emanuel Varga
Top achievements
Rank 1
 answered on 04 Oct 2010
6 answers
182 views
hi, below is a list of errors I have since upgrading to SP2.

1)  'Error 4 function 'ProcessTabKey' cannot be declared 'Overrides' because it does not override a function in a base class. '

 

 

Class

 

CustomGridBehavior

 

 

Inherits BaseGridBehavior

 

 

Protected Overloads Overrides Function ProcessTabKey(ByVal keys As System.Windows.Forms.KeyEventArgs) As Boolean

 

 

 

 

 

If Me.CheckIfLast() Then

 

 

 

 

 

Me.GridControl.EndEdit()

 

 

Me.GridControl.Rows.AddNew()

 

 

Me.GridControl.Rows(Me.GridControl.Rows.Count - 1).IsCurrent = True

 

 

 

 

 

Me.GridControl.Columns(1).IsCurrent = True

 

 

 

 

 

Me.GridControl.Focus()

 

 

Me.GridControl.BeginEdit()

 

 

Return True

 

 

 

 

 

Else

 

 

 

 

 

Me.GridControl.Focus()

 

 

Me.GridControl.EndEdit()

 

 

TryCast(GridControl.DataSource, BindingSource).EndEdit()

 

 

Return MyBase.ProcessTabKey(keys)

 

 

End If

 

 

 

 

 

End Function

 

 

 

 

2)  'Error 5 'ProcessTabKey' is not a member of 'Telerik.WinControls.UI.BaseGridBehavior'. '

 

Same code as above

3)  'Error 6 Value of type 'Debitask.CustomRadGridView' cannot be converted to 'Telerik.WinControls.UI.RadGridViewElement'.'

Class

 

CustomRadGridView

 

 

Inherits RadGridView

 

Public Sub New()

 

Dim gridBehavior As New CustomGridBehavior()

 

gridBehavior.Initialize(

Me)  '<-- This line.

 

 

 

Me.GridBehavior = gridBehavior

 

 

 

 

End Sub

 

4) 'Error 33 Property 'Index' is 'ReadOnly'.'

newColumn =

New GridViewCheckBoxColumn

 

 

With newColumn

 .BestFit()

.HeaderText = 

 "Selected"

 

 

 

 .ReadOnly = False

 

 

 

.Index = 0

 

 

End With

 

 

 

5) Error 38 'CellElement' is not a member of 'Telerik.WinControls.UI.GridViewCellInfo'.

rowCurrent.Cells(

"image").CellElement.Image = Debitask.My.Resources.delete16

 

 

6) Error 117 Event 'GroupSumaryEvaluate' cannot be found'
private  Sub grdAccessGroups_GroupSumaryEvaluate(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs) Handles grdAccessGroups.GroupSumaryEvaluate

 

 

 

 


Hilda Kenny
Top achievements
Rank 1
 answered on 04 Oct 2010
2 answers
172 views
Yeah that wasn't the best subject line ever.

OK so I've added a gredview to the form.  Now I want to setup some hierarchy.  Using the help as a guideline I'm looking for the MasterGridViewTemplate property in the properties - can't find it, so going to the property builder for the grid I look in there for the ChildGridViewTemplates, no luck with that either.

I'm using the 2010 Q2 SP1 version of WinForms.... 

Any ideas what is going on?

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 04 Oct 2010
2 answers
85 views
Hi:
I have a project developed with Rad Controls For WinForms Q2 2009 and I installed a lastest  the version Q2 2010.
After, I open the Project Update Utility and update my project, however I have many errors in the designer.

Help me please!
Thanks
Jack
Telerik team
 answered on 04 Oct 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)
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?