Telerik Forums
UI for WinForms Forum
2 answers
143 views
Hi,

I'm using Telerik.WinControls.GridView version 2012.1.321.20.
I have a GridView with a GridViewComboBoxColumn, and the problem I have is that when the box is open and I click on the scroll square- than it's like the focus is out and the comboBox is closed (it's like freezing for 2 seconds and than closing...).

Also, I'm using the next definitions, as you recommended before:
public class CustomDropDownListEditor : RadDropDownListEditor
{
    protected override RadElement CreateEditorElement()
    {
        return new CustomDropDownListEditorElement();
    }
}
  
public class CustomDropDownListEditorElement : RadDropDownListEditorElement
{
    protected override RadPopupControlBase CreatePopupForm()
    {
        this.Popup = new CustomDropDownPopupForm(this);
        this.Popup.VerticalAlignmentCorrectionMode = AlignmentCorrectionMode.SnapToOuterEdges;
        this.Popup.SizingMode = this.DropDownSizingMode;
        this.Popup.Height = this.DropDownHeight;
        this.Popup.HorizontalAlignmentCorrectionMode = AlignmentCorrectionMode.Smooth;
        this.Popup.RightToLeft = this.RightToLeft ? System.Windows.Forms.RightToLeft.Yes : System.Windows.Forms.RightToLeft.Inherit;
  
        this.WirePopupFormEvents(this.Popup);
        return Popup;
    }
}
  
public class CustomDropDownPopupForm : DropDownPopupForm
{
    public CustomDropDownPopupForm(RadDropDownListElement owner): base(owner) {}
          
    public override string ThemeClassName
    {
        get { return typeof(DropDownPopupForm).FullName; }
        set {}
    }
  
    public override void ClosePopup(PopupCloseInfo info)
    {           
        base.ClosePopup(info);
        if (info.CloseReason == RadPopupCloseReason.Keyboard)
        {
            ((RadGridView)this.OwnerElement.ElementTree.Control).EndEdit();
        }
    }
  
    protected override void OnMouseUp(MouseEventArgs e)
    {
        base.OnMouseUp(e);           
        ((RadGridView)this.OwnerElement.ElementTree.Control).EndEdit();
    }
}
 
You should handle the EditorRequired event to replace the editor:
void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
{
    if (e.EditorType == typeof(RadDropDownListEditor))
    {
        e.EditorType = typeof(CustomDropDownListEditor);
    }
}

What should I do in order to not loose the focus when click on scrolling? I need the user to scroll up/doun and choose another option from the list.

I'm attaching an image of my comboBox.

Thanks,
Hila.

Elad
Top achievements
Rank 1
 answered on 23 Dec 2012
4 answers
290 views
Hello,

I use a Rad DateTimePicker in a certain application. What I want to achieve is to get the date that the user selects, along with the time of course, and send those using JScript to an asmx webservice as one of its arguments. What I did was that I sent the datetime as string from the JScript file and in the webservice I tried to parse that string back to datetime format using convert.todatetime method and I tried several other conversion methods but my problem was always one; and that is the string that's being sent is not recognized as a correct "convertible" datetime.

I debugged, and it's always sent as, for example, "2012-12-13-08-02-05" [this corresponds to 13/12/2012 08:02:05]. As you can see, this string really is not in one of the acceptable formats that the parsing methods accept.

I tried to change the input dateformat of the datetimepicker and it does change but only in displaying; it does not change in the string according to what I want [I mean the format I set is reflected on display only and not on save]. 

I'd really appreciate your help, thank you.
Diana
Top achievements
Rank 1
 answered on 22 Dec 2012
3 answers
105 views
Hi, i'm trying to do the Drag and Drop like the demo, but my first listbox it's conected with my dataset and when I do the drag and drop, gives me this error:

Data bound items can not be removed. Remove items from the data source instead.

If you can explain to me how to fix this. Thank You.
Stefan
Telerik team
 answered on 21 Dec 2012
1 answer
155 views

For those who might want to use this, I have created a quick sample on how to use linq to create dynamic series for chartview:

Example is created in VS2010 / VB.NET 

Make sure you import:
System.Data.DataSetExtensions.dll
to use linq.

Me.RadChartView1.ShowLegend = True
Me.RadChartView1.ShowTitle = True
Me.RadChartView1.Title = "Sold products per country"
 
        Dim graphSeries As New DataTable()
 
        graphSeries.Columns.Add("Category", GetType(String))
        graphSeries.Columns.Add("Value", GetType(Integer))
        graphSeries.Columns.Add("XValue", GetType(String))
 
 
        graphSeries.Rows.Add("Netherlands", 10, "2011")
        graphSeries.Rows.Add("USA", 12, "2011")
        graphSeries.Rows.Add("Germany", 7, "2011")
        graphSeries.Rows.Add("Netherlands", 25, "2012")
        graphSeries.Rows.Add("USA", 40, "2012")
        graphSeries.Rows.Add("Germany", 25, "2012")
 
       Dim productGroups = From p In graphSeries _
       Group p By Category = p.Field(Of String)("Category") Into Group _
                        Select Category, ProductGroup = Group
 
        For Each g In productGroups
            Dim barSeries As New Telerik.WinControls.UI.BarSeries("Value", "Category")
            barSeries.Name = g.Category
            barSeries.ValueMember = "Value"
            barSeries.CategoryMember = "XValue"
            barSeries.ShowLabels = True
            barSeries.LegendTitle = g.Category
            Me.RadChartView1.Series.Add(barSeries)
            barSeries.CombineMode = Telerik.Charting.ChartSeriesCombineMode.Stack
            barSeries.DataSource = g.ProductGroup.CopyToDataTable
 
        Next
Stefan
Telerik team
 answered on 21 Dec 2012
1 answer
156 views
I have set bmp images on commandbar buttons on the commandbar strip element. But, the images area not showing transparent..
Please find the attachments
Anton
Telerik team
 answered on 21 Dec 2012
1 answer
157 views
With the standard datagrid view in vs2010, I can highlight several rows in an excel sheet, containing, say title ID numbers, then left click on the datagrid and paste those values into the grid.

Is that even possible with the telerik grid view ?

Thanks.
Ivan Petrov
Telerik team
 answered on 21 Dec 2012
1 answer
112 views
Is there an example or can someone assist me in creating a simple bar chart while consuming data using entity framework?
The query could be as simple as:

SELECT        COUNT(Invoice_Header_Id) AS [Total Invoices], Created_By
FROM            Accounts_Payable.Invoice_Header
WHERE        (Date_Created >= CONVERT(DATETIME, '2012-12-19 00:00:00', 102))
GROUP BY Created_By

I don't have an entity created yet.  I would most likely use a store procedure and return a complex type.

Any help is appreciated.

Thanks
Bob
Missing User
 answered on 21 Dec 2012
5 answers
294 views
Hello.

I have a RadGridView with multiple date columns. When the user selects a date (using built-in editor) in any column, I want to save it in the database. If I use the RadGridView1_CellValueChanged event, I can get the new value using
radGridView1.CurrentRow.Cells[radGridView1.CurrentColumn.Name].Value.ToString()


but the drawback is that the user must click outside the cell to trigger the event. So I elected to use RadGridView1_ValueChanged instead, but then, the value doesn't seem to be written in the Gridview's cell at the time the event triggers so the line doesn't work as it always returns the old value.

How can I get the new user value from within RadGridView1_ValueChanged? Please consider that I also have spinner-type editors in the grid that will trigger the same way (and I want them to), so a code sample with multiple editor types on multiple columns would be of great help too.

Thanks alot.
Plamen
Telerik team
 answered on 21 Dec 2012
2 answers
124 views
Hello,

is there a Win 8 Theme available for the Windows Forms RibbonBar?
Marco
Top achievements
Rank 1
 answered on 21 Dec 2012
1 answer
189 views
Hi

I have simple scenario in which a RadDropDownList  is populated from a small table in a database. After it has been populated if needed I need to select the Item or index or display value programmatically. 
Also there is no problem with diplaying the items the items and the selection process works fine, items are diplayed in order.

I have tried to set all the fields that I can with respect to the databinding
here is the windows autogen code for the form where the dropdown resides
//
          // MachineTypeDropDownList
          //
          this.MachineTypeDropDownList.AutoCompleteDisplayMember = "M_Type";
          this.MachineTypeDropDownList.AutoCompleteValueMember = "MachineID";
          this.MachineTypeDropDownList.DataBindings.Add(new System.Windows.Forms.Binding("SelectedIndex", this.machineDataBindingSource, "MachineID", true));
          this.MachineTypeDropDownList.DataBindings.Add(new System.Windows.Forms.Binding("SelectedItem", this.machineDataBindingSource, "M_Name", true));
          this.MachineTypeDropDownList.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.machineDataBindingSource, "MachineID", true));
          this.MachineTypeDropDownList.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.machineDataBindingSource, "M_Name", true));
          this.MachineTypeDropDownList.DataSource = this.machineDataBindingSource;
          this.MachineTypeDropDownList.DisplayMember = "M_Type";
          this.MachineTypeDropDownList.Location = new System.Drawing.Point(182, 52);
          this.MachineTypeDropDownList.Name = "MachineTypeDropDownList";
          this.MachineTypeDropDownList.Size = new System.Drawing.Size(136, 20);
          this.MachineTypeDropDownList.TabIndex = 0;
          this.MachineTypeDropDownList.Text = "System.Data.DataViewManagerListItemTypeDescriptor";
          this.MachineTypeDropDownList.ValueMember = "MachineID";
          this.MachineTypeDropDownList.DataBindingComplete += new Telerik.WinControls.UI.ListBindingCompleteEventHandler(this.MachineTypeDropDownList_DataBindingComplete);
          this.MachineTypeDropDownList.Initialized += new System.EventHandler(this.MachineTypeDropDownList_Initialized);


In the form constructor  InitializeComponent() is called after that I try to set the value of selected item of dropdown.
at this point Items count is still 0 
this.MachineTypeDropDownList.DropDownListElement.Items.Count
or
this.MachineTypeDropDownList.Items.Count

i have tried to use the lisener for databound compeleted but items are still 0
private void MachineTypeDropDownList_DataBindingComplete(object sender, Telerik.WinControls.UI.ListBindingCompleteEventArgs e)
       {
           System.Diagnostics.Debug.WriteLine("this.MachineTypeDropDownList.DropDownListElement.Items  --------------------------------" + this.MachineTypeDropDownList.DropDownListElement.Items.Count);
           System.Diagnostics.Debug.WriteLine("this.MachineTypeDropDownList.Items  --------------------------------" + this.MachineTypeDropDownList.Items.Count);
       }

I get the same result after when i try
private void MachineTypeDropDownList_Initialized(object sender, EventArgs e){}

My question is at what point , or what event signals that the binding process is complete and further manipulation of the dropdownlist can comence?
Why is it that by the end of the form contructor code,  the binding has not happened yet.


Thank you very much for any pointers to understand the telerik framework better
Ervis
Peter
Telerik team
 answered on 21 Dec 2012
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?