Telerik Forums
UI for WinForms Forum
2 answers
285 views
Hi There,

I am having difficulty understanding what is going wrong with my code.

I have a gridview wtih a datasource set to an entity framework object. In the gridview is a datetimepicker column that I want to show the date in the format "dd/MM/yyyy" the format of the information stored in my entity framework is in the format "dd/MM/yyyy" Upon loading the datagridview I populate the gridview with the information from my EF object. This works a deam and is as expected.

However the problems begin when I add a new row to the datagrid, no matter what I try when adding a new row the datetimepicker always sets the column to have a value including the time. I have set the format string correctly to "{0: dd/MM/yyyy}". If I stop the datasource binding to my EF object the date is added correctly to the new row. It seems that the problem only occurs If I use the datasource.

It would appear that this is a problem with the .fieldname I am using, if I remove this I have no problems.

Anyone offer any advice on what is going wrong here?

Many Thanks
Peter
Telerik team
 answered on 31 Oct 2011
1 answer
189 views
Hi,

I've just been playing about with this BubbleBar component and I'm having trouble getting it to behave as described.

I've been working from the example in this thread:

http://www.telerik.com/community/forums/winforms/forms-and-dialogs/bubble-bar.aspx#1436417

I can download the code Nikolay provided as an attachement and run it and it works.

The problem comes when editing it.

Nikolay
says:

"After you add these files to your customer project, build it in order to get the BubbleBar component in the VS Toolbox. Then you should simply drag and drop BubbleBar to your form and fill it with RadButtonElement through the Edit Items menu item of the BubbleBar's ActionMenu."

However, even though I can build and run the sample code - I can't seem to get the component to appear in the toolbox. I have tried manaually adding it and it says it's already added, but it does not appear. I can edit the one that is on the form already, I just can't get it into the toolbox - so I can't easily add the control to another form.

I can wrap the BubbleBar in a standard WinForms control by copying the existing one on the demo form into a new control - the WinForms control appears in my tool box. This means that the VS toolbox is picking up the controls from my project - it's just not picking up the BubbleBar.

I want to be able to create custom controls based on the RadControls and I'm slightly worried something is set up wrong because I can't even get this demo control to work as expected. I don't want to spend time building up controls only to find that I have to hard code them because the designer doesn't support them properly.

I can load up the ExamplesCSVS2010.sln from the Q2 2011 Examples for WinForms - which includes the BubbleBar in the Integration examples - here I can get the BubbleBar running fine, but I can't get it into the Toolbox.

It's probably just something daft I'm doing wrong, I'm just getting the hang of these Rad bits...

Any pointers would be appreciated...

:)






Ivan Petrov
Telerik team
 answered on 31 Oct 2011
1 answer
95 views
Ivan,
   I DELETED the zip example file so sorry OOPS....REGISTERED FILES...
                                                                            Will try to bind in code for multi user... :)
                                                                                          Jeff Link
Stefan
Telerik team
 answered on 31 Oct 2011
3 answers
251 views

Hello,

In our application we use RadSpinEditor with binding.

Now we notice a problem with the binding of the control:

When we update the control by the keyboard, then leave the control by tab, returning to the spinEditor and updating another value, the new value does'nt save – when leaving the control the last value returns.

Looking forward to your reply.        


Here is a sample code:

 

static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
    public class Form1 : Form
    {
        List<Class1> l = new List<Class1>();
        public Form1()
        {
            InitializeComponent();
            l.Add(new Class1());
        }
  
        private void Form1_Load(object sender, EventArgs e)
        {
            this.radSpinEditor1.DataBindings.Add("Value", l, "Number");
        }
  
        #region Windows Form Designer generated code
  
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.radSpinEditor1 = new Telerik.WinControls.UI.RadSpinEditor();
            this.button1 = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.radSpinEditor1)).BeginInit();
            this.SuspendLayout();
            // 
            // radSpinEditor1
            // 
            this.radSpinEditor1.Location = new System.Drawing.Point(77, 39);
            this.radSpinEditor1.Name = "radSpinEditor1";
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(90, 86);
            this.button1.Name = "button1";
            this.button1.Text = "button1";
            // 
            // Form1
            // 
            this.ClientSize = new System.Drawing.Size(262, 121);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.radSpinEditor1);
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.radSpinEditor1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
  
        }
  
        #endregion
  
        private Telerik.WinControls.UI.RadSpinEditor radSpinEditor1;
        private System.Windows.Forms.Button button1;
    }
  
    class Class1
    {
        int number;
  
        public int Number
        {
            get { return number; }
            set { number = value; }
        }
    }

 

Peter
Telerik team
 answered on 31 Oct 2011
3 answers
146 views
I have a RadGrid performing some timesheet functionality with two columns StartTime and StopTime which are both GridViewDateTimeColumn. A person gets a StartTime when they clock in and a StopTime when they clock out. When the RadDateTimeEditor is initialized, I'm setting it to ShowUpDown and a custom time format since it displays time only. I'm also setting restrictions that the minValue of the StopTime equals the current value of the StartTime (since you can't clock out before you clock in). You can see the attached code for specifics. The problem is situations can occur where there is no valid StopTime. For example, if someone has a StartTime of 11:15 AM and then tries to set the StopTime, the editor will set the NullValue and MinValue of the StopTime to 11:15 AM. The step arrows for up and down show up, but clicking them does nothing since the value for both is invalid. Clicking down makes the time 10:15 AM, which is invalid and clicking up makes the time 12:15 AM which is also invalid. The numbers themselves never actually show up, but this what I assume is happening. I'm not sure what to do to fix this situation. Basically, the stepper will never work if its current value is null and the MinValue is set to anything in between 11:00 - 11:59AM. Maybe I'm missing something. Any help is appreciated.

        private void m_rgvTimesheets_CellEditorInitialized( object sender, GridViewCellEventArgs e )
        {
            if( e.ActiveEditor is RadDateTimeEditor )
            {
                var editor = (RadDateTimeEditor)(e.ActiveEditor);
                RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)editor.EditorElement;
                editorElement.ShowUpDown = true;
                editorElement.CustomFormat = "h:mm tt";
                if( e.Column.Name == ColumnTS_StopTime )
                {
                    var startTime = (DateTime) e.Row.Cells[ColumnTS_StartTime].Value;
                    editor.NullValue = startTime;
                    editor.MinValue = startTime;
                    editor.MaxValue = GetMaxTime( m_rdtpDatePicker.Value );
                }
        }
}
Peter
Telerik team
 answered on 31 Oct 2011
4 answers
143 views
Hi again
As I said before, I`m trying 2011 q1 (trial) on winform for testing puporses,

Here is an issue,
for normal LTR TreeView the Right Arrow Key should expand and Left Arrow Key should collapse the tree, and it`s OK,
but for RTL, when tree is at right side, the Left Arrow Key should Expand the tree and Right Arrow Key should collpase.
with swaping this two Key the problem whill gone,
as you said the KeyPress and KeyDown event does not fire up in this version, so what is the solution?
Stefan
Telerik team
 answered on 31 Oct 2011
1 answer
205 views
Hi,

I have a RadListView in DetailsView, I have set EnableSorting=True but I cannot get the columns to sort when I click the column headers.

In the .net version of ListView there is a colum_click event but that is not there for the RadListView.

I see in the Telerik examples that you create a command bar. This seems a bit over the top for what I want to do. I have 3 columns and I would like to be able to sort ascending or descending depending on the number and order the columns are clicked in.

Cheers
Baz
Simon
Top achievements
Rank 1
 answered on 31 Oct 2011
1 answer
56 views
I just purchased a license for Win Forms package.

So far I've been using the trial version of Q2 2010 and last week I decided to upgrade it to licensed version of Q2 2011.
After uninstsalling the existing version, installing the Q2 2011 and changing the references from my project to the new DLLs I run into following issues:

1.    Error 18 Property or indexer 'Telerik.WinControls.UI.RadTreeNode.DataBoundItem' cannot be assigned to -- it is read only 
2.    Error 25 'Telerik.WinControls.UI.RadTreeNodeCollection' does not contain a definition for 'Find' and no extension method 'Find' accepting a first argument of type 'Telerik.WinControls.UI.RadTreeNodeCollection' could be found (are you missing a using directive or an assembly reference?) 

I found this on your TreeView class in regards to Find method.
This property will be removed in the next version. You can define your own search behavior by setting the Find method.



Please let me know how I can resolve those issues.
Julian Benkov
Telerik team
 answered on 28 Oct 2011
4 answers
394 views
Hello,

Prior to Q2 2011 SP1 (version 2011.2.11.831), we had no problems with the subclass of the RadDateTimePicker we created, but since then, we are having issues with SetToNullValue() and DataBinding.  We were using RadControls for WinForms Q3 2010 prior to updating.  

When we call this.radDateTimePicker1.SetToNullValue(), it appears to "null" out the control, but when you move to the next control, the datetime control goes from not having a value displayed to displaying the value before SetToNullValue() was called.  In the bound source, the column contains the NullDate value while the control's Value property has the value from before SetToNullValue() was called

I have also come across inconsistency of values when the control is bound to a dataset from SQL Server.  From tracing thru the code, we are able to determine that the correct date is in the Value property, but when we looked at the DataTable its bound to, the value there is different.

The code has not changed and I have been able to replicate the SetToNullValue behavior in a new project using just the RAD controls. 

Any help is appreciated,
Chet


Peter
Telerik team
 answered on 28 Oct 2011
1 answer
116 views
First let me say I am a web programmer, but I have a need for a small utilities app that needs a data grid.  I load the form, user selects several options and clicks button.  On click I generate a DataSet and call gridview1.DataSource = datasetname;

The datasource has data, and the gridview is set to autogeneratecolumns = true.

Nothing changes and no data is shown.  What am I missing here?

Thanks!

Jeff
Ivan Petrov
Telerik team
 answered on 28 Oct 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
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?