Telerik Forums
UI for WinForms Forum
16 answers
426 views
Version:Q2 2010 SP2
The demo 'Rows Drag&Drop' works in un-bound mode but not in database bound mode.How to get it working?
Brahim
Top achievements
Rank 1
 answered on 13 Nov 2010
4 answers
174 views
Hi,

I need to know the name of the sender's column in a GridView. The below code in WinForms Q2 2010 SP2 doesn't work. The code is:

Private Sub Grid_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Grid.ValueChanged
    Dim dce As GridDataCellElement
    dce = CType(sender, GridDataCellElement)
    If dce.ColumnInfo.Name = "Devol" Then
        If Grid.CurrentRow.Cells("Devol").Value Then
            Grid.CurrentRow.Cells("DaysDefDev").ReadOnly = False
        Else
            Grid.CurrentRow.Cells("DaysDefDev").ReadOnly = True
            Grid.CurrentRow.Cells("DaysDefDev").Value = 0
        End If
    End If
End Sub

In the previous code the column named "Devol" is GridviewCheckBoxColumn and "DaysDefDev" is a numeric column. When I check or uncheck "Devol" column an exception occurs with the message like "Can't cast from 'Telerik.WinControls.UI.RadCheckBoxEditor' to 'Telerik.WinControls.UI.GridDataCellElement'."

If I type TryCast insted of CType the object is always nothing and another exception is thrown.

Any help would be great.

Thanks.
Emanuel Varga
Top achievements
Rank 1
 answered on 12 Nov 2010
3 answers
114 views
I have created a custom control in VB.net which inherits a RadGridView.  When I drop it on the form, it looks nothing like the base control.  Does anyone know why this is and how I can make it look like the base control?  I have attached an image of the base control and the custom control.  The base control is on teh top and you can see the difference. 

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 12 Nov 2010
5 answers
165 views

Hi,

I am using the scheduler in TimeLineView and create my appointments programmatically.  I want the users to be able to amend the dates and duration of some of the appointments, but not others.

 

I have set the appointment.AllowEdit to false, but this doesn’t seem to work, as the user can still amend the appointment.

 

Any thoughts or suggestions

 

Karl

Dobry Zranchev
Telerik team
 answered on 12 Nov 2010
12 answers
233 views
hello,

i am using RadControls 2010 Q2 , and in the radDatetimePicker i am going to change the Culture property of it to the Persian Culture.
it throws this exception :

Specified time is not supported in this calendar. It should be between 03/21/0622 00:00:00 (Gregorian date) and 12/31/9999 23:59:59 (Gregorian date), inclusive.
Parameter name: time


would you please help me to find a solution for it ?
how can i change the culture of radDatetimePacker ?
Stefan
Telerik team
 answered on 12 Nov 2010
4 answers
120 views
Is there a way to control the size of the Edit Appointment dialog or at least make it resizeable by the user? I find that it's not effeciently using all the space available in the browser and would like to make it taller to be able to display more custom fields without forcing the user to scroll. Earlier versions of the control didn't have this problem.
Richard Slade
Top achievements
Rank 2
 answered on 11 Nov 2010
23 answers
659 views
Is it possible to drag one or more rows from one radgrid to another radgrid on a form?

I saw there was a property allowdrop so i'm guessing that it is possible.

Is there some example code on how to do this?

thanks
Mario
Top achievements
Rank 1
 answered on 11 Nov 2010
5 answers
106 views
On the theme of cutting down on the user keystroke count for my application:

I have a RadGridView. Inside that RadGridView is a radComboColumn that contains information from a BoxCode DataTable. Value is the BoxCodeTable.ID and Display is BoxCodeTable.Description.

The BoxCode DataTable also stores length, width, and height information for a given box. When the user selects a box and the editor is closed, the length, width, and height values are loaded from the DataTable and inserted into three fields in the RadGridView's CurrentRow. The idea is that a user should be able to override these values in certain boundary conditions.

That's all working. But it is annoying to me that, when a BoxCode is selected from the ComboBoxColumn, the user must press the Enter Key (or click elsewhere on the grid) to close the editor. I want to take that keystroke out.

And I've managed to do that with a bit of a hack. However, it feels really, really awkward.

In RadGridView.CellBeginEdit event, I am calling the following code to bind an event to the RadComboBoxEditor:

        private void gvwManifestLines_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) 
        { 
            if (e.ColumnIndex == this.gvwManifestLines.Columns["saturdayDelivery"].Index) 
            { 
                // A whole bunch of code omitted. 
            } 
            else if (e.ColumnIndex == this.gvwManifestLines.Columns["PackageChooser"].Index) 
            { 
                RadComboBoxEditor comboEditor = this.gvwManifestLines.ActiveEditor as RadComboBoxEditor; 
                comboEditor.DropDownStyle = RadDropDownStyle.DropDownList; 
                comboEditor.AutoCompleteMode = AutoCompleteMode.Suggest; 
                comboEditor.PopupClosed += new RadPopupClosedEventHandler(comboEditor_PopupClosed); 
 
                //More code for processing - not relevant. 
            } 
        } 
 
        void comboEditor_PopupClosed(object sender, RadPopupClosedEventArgs args) 
        { 
            RadComboBoxEditor comboEditor = sender as RadComboBoxEditor; 
            if (comboEditor != null
            { 
                comboEditor.PopupClosed -= new RadPopupClosedEventHandler(comboEditor_PopupClosed); 
                SendKeys.Send("\r"); 
            } 
        } 
 

As you can see, I'm closing the editor by sending the return keystroke myself. This is working. I'm a bit shy about it, however. It feels a shaky to close the editor by relying on sending keystrokes. Is there a better solution to this problem?

I tried EndEdit(), but no dice.
Jack
Telerik team
 answered on 11 Nov 2010
6 answers
183 views
Hi,

I'm trying to use the telerik theme with the last winforms build.

But it don't work very well (eg. in radgrid)

Is this theme is actual ? If not do you plan to update it ?

And I renember that you have a link where we can find some users themes but i don't find it....

Regards
Jack
Telerik team
 answered on 11 Nov 2010
1 answer
339 views
Hi,

Ive created a custom control using the telerik controls, which is based on the "business card" example provided in the demo code. 
That is a RadControl that allows custom RadButtomElements to be added to it.  The RadButtonElements are stored in a WrapLayoutPanel.  However Im having difficulty getting scrolling to work properly.  Ive seen quite a few examples and threads about scrolling using the stacklayoutpanel, however I want to use the wraplayoutpanel to get better presentation, as each element is of variable size.  However using the wraplayout the scrollbars do not appear correctly.  At runtime it looks as though the viewport settings are calculated as if the viewport is a stacklayout not a wraplayout. 

Any help will be greatly appreciated.

Hopefully looking at this code will make a bit more sense...

Version of Rad controls (WinForm) 2009.3.9.1203
 

RadScrollViewer

 

scrollViewer = new RadScrollViewer();
 
Telerik.WinControls.UI.RadPanel radPanel1= new Telerik.WinControls.UI.RadPanel();

this
.Controls.Add(this.radPanel1);
WrapLayoutPanel
wrapLayout = new WrapLayoutPanel();

 

wrapLayout.Orientation =

Orientation.Horizontal;  

 

 

scrollViewer.Viewport = wrapLayout;

 

this.radPanel1.PanelElement.Children.Add(scrollViewer);  

for(int i = 0 ; i < 100; i++)  

{

wrapLayout.Children.Add(

 

new RadButtonElement() {Text = "Test" + i, Padding = new Padding(5), Margin = new Padding(2), Size = new Size(50,10)});  

}

 

 

Nikolay
Telerik team
 answered on 11 Nov 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
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
ProgressBar
CheckedDropDownList
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
VirtualKeyboard
NavigationView
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?