Telerik Forums
UI for WinForms Forum
3 answers
610 views
I am trying to validate values being entered into my grid real-time in the CellEndEdit event handler.  If I find that the value entered is not valid, I push a message to the user and want to fire the BeginEdit on that same field, to keep them there until they enter something valid.

I cannot kickoff the BeginEdit method successfully on the cell.  Sifting through this forum, I found some "like" problems and tried implementing some suggested techniques, all with no success.  Below is some sample code.

Private Sub grdMain_CellEndEdit(ByVal sender As ObjectByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles grdMain.CellEndEdit 
 
    If e.Row.Cells(2).Value.ToString <> "" Then 
        If e.Row.Cells(2).Value.ToString.ToUpper <> "TRUE" And e.Row.Cells(2).Value.ToString.ToUpper <> "FALSE" Then 
            e.Row.Cells(2).Selected = True 
            e.Row.Cells(2).CellElement.IsCurrent = True 
            e.Row.Cells(2).BeginEdit() 
        End If 
    End If 
 
End Sub 


The BeginEdit does not fire, but the cell is selected in the grid.

Regards,
Christopher Thumann
Victor
Telerik team
 answered on 10 Mar 2010
7 answers
171 views
Hai,
I'm creating a simple program to display some values in a chart. The user can select the type of chart.But I'm having problem to create the pie chart. The problem is that I cannot combine two values into a single pie.Instead only by creating two chartseries. Pls help me to rectify the problem.
Thanks

using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Windows.Forms; 
using Telerik.Charting; 
using Telerik.WinControls.UI; 
using Telerik.WinControls; 
using Telerik.WinControls.Primitives; 
using FrmErdStatusChart.CallSignWebService; 
using System.Collections; 
 
 
 
namespace FrmErdStatusChart 
    public partial class Form1 : RadForm 
    { 
        public Form1() 
        { 
            InitializeComponent(); 
            radChart1.ChartTitle.TextBlock.Text = "Status Chart"
            radChart1.Appearance.Border.Visible = false
            radChart1.Appearance.FillStyle.MainColor = Color.Lavender; 
            radChart1.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.Black; 
            this.radChart1.Series[0].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.Nothing; 
            this.radChart1.Series[1].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.Nothing; 
             
        } 
        CallSignWebService.CallSignWebService callsignWS = new CallSignWebService.CallSignWebService(); 
        ArrayList statusArray = new ArrayList(); 
        ChartSeries cs = new ChartSeries(); 
        ChartSeries cs1 = new ChartSeries(); 
         
 
        int online ; 
        int offline ; 
        string[] status = {"online" , "offline" }; 
 
 
        //Add the status ==> online 
        public void AddAvailable() 
        { 
            cs.Clear(); 
            cs.Items.Add(new ChartSeriesItem(online)); 
            radChart1.Series.Add(cs); 
            cs.Name = "Online " + online; 
            radChart1.DataBind(); 
        } 
 
        //Add status ==> offline 
        public void AddOffline() 
        { 
            cs1.Clear(); 
            cs1.Items.Add(new ChartSeriesItem(offline)); 
            radChart1.Series.Add(cs1); 
            cs1.Name = "offline "+offline; 
            radChart1.DataBind(); 
        } 
 
 
        //Get the status from the callsign 
        public void addStatus() 
        { 
            callSign[] callSignList = callsignWS.findAll(); 
            foreach (callSign callSign in callSignList) 
            { 
               statusArray.Add(callSign.status); 
           ///// Console.WriteLine(callSign.unit); 
                 
            } 
           
        } 
 
        //filter out the status according to online,offline 
        public void addChart() 
        { 
            online = 0
            offline = 0
             
             
          /*  for (int i = 0; i < statusArray.Count; i++) 
            { 
                //counts status ==> online 
                foreach (string online in statusArray) 
                { 
                    o++; 
                } 
                //counts status ==> offline 
                foreach (string offline in statusArray) 
                { 
                    f++; 
                } 
                break; 
            }*/ 
            for (int i = 0; i < statusArray.Count;i++ ) 
            { 
                if (statusArray[i].ToString() == "Online") 
                { 
                    online++; 
                } 
                else offline++; 
 
            } 
            Console.WriteLine("Online ==> "+online); 
            Console.WriteLine("Offline ==> "+offline); 
          
        } 
         
 
        private void radComboBox1_SelectedValueChanged(object sender, EventArgs e) 
        { 
 
        } 
 
        private void radComboBox1_SelectedIndexChanged(object sender, EventArgs e) 
        { 
 
            // Check whether an item in combo box is selected 
            if (radComboBox1.SelectedItem != null) 
            { 
                //value is equal to pie 
                if (radComboBox1.SelectedIndex == 0) 
                { 
                  /*  radChart1.Series.Clear(); 
                    ChartSeries cs2 = new ChartSeries(); 
                    cs2.Type = ChartSeriesType.Pie; 
                     
                    radChart1.Series.Add(cs2); 
                    radChart1.DataSource = new int[] {o,f }; 
                    radChart1.DataBind();*/ 
 
                    AddOffline(); 
                    AddAvailable(); 
                     
                    cs.Type = ChartSeriesType.Pie; 
                    cs1.Type = ChartSeriesType.Pie; 
 
                } 
                //value is equal to bar 
                else if (radComboBox1.SelectedIndex == 1) 
                { 
 
                    AddOffline(); 
                    AddAvailable(); 
                    cs.Type = ChartSeriesType.Bar; 
                    cs1.Type = ChartSeriesType.Bar; 
  
                } 
                //Value is equal to point 
                else if (radComboBox1.SelectedIndex == 2) 
                { 
 
                    AddOffline(); 
                    AddAvailable(); 
                    cs.Type = ChartSeriesType.Point; 
                    cs1.Type = ChartSeriesType.Point; 
 
                } 
            } 
        } 
 
        private void Form1_Load(object sender, EventArgs e) 
        { 
            addStatus(); 
            addChart(); 
        } 
    } 
 

amrutha anil
Top achievements
Rank 1
 answered on 10 Mar 2010
3 answers
110 views
Hi,

I've tried repeatedly following the tutorial for modifying the theme of the RadDock, but to no avail. I follow the steps, and the "HotPepper" theme never appears as an option for RadDock. I noticed the sample refered to "DockingManager" and not "RadDock" which I think may be part of the problem.

Am I completely missing something?

-Mike
Nikolay
Telerik team
 answered on 09 Mar 2010
3 answers
123 views
For displaying and showing "Metrics" Data on a dashboard. 
I beleive you already have this for silverlight and asp 
Martin Vasilev
Telerik team
 answered on 09 Mar 2010
3 answers
90 views
I have add and delete buttons within my grid and using the tab key they get passed up and the focus is on the first column on the next line.  How can I have my buttons gain focus?  I have to make my app fully keyboard friendly.  Any other issues I might face with the grid using the keyboard?

Thank You
Martin Vasilev
Telerik team
 answered on 09 Mar 2010
7 answers
98 views
Hi

I have a Hierarchy grid which have child gris upto third level Hierarchy.
I need to show the selected row in third level child grid, after binding the grid.
currently when i am trying to select the third or second child hierarchy grid , first row of the top most hierarchy gets selected.

Any one Please suggest the solution with sample code .

Thanks
Ajay
Nikolay
Telerik team
 answered on 09 Mar 2010
3 answers
194 views
HI,

I have two questions:

1. I want to change background color of appointment. You have implemented enumeration for background colors. I want appointment background color as per my appointment's time slot. So I want to use my own background colors in appointment, can I..??

2. I want to place image in appointment. Sample snapshot I am posting which I implemented in Telerik's WPF scheduler. Can I have similar kind of facility of placing image in appointment, Or any way by which I can create template for appointment..??

Thanks in advance.
Boyko Markov
Telerik team
 answered on 09 Mar 2010
6 answers
331 views
Hello,

I want my Splash Screen appears like it's opacity value should be increased from 0 to 100. is there any way to do it with AnimationEngine Class or with AnimationForm ? Or you know another way do it ?

Thanks
Nick
Telerik team
 answered on 09 Mar 2010
12 answers
313 views
Hello,
Is there a way to save off the RecurrenceRule and then easily load it back in during a future load?

I save the rule to a string variable in:

void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)        
        {
string sRule;
sRule = ev.RecurrenceRule.ToString();
}

When I am manually creating appointments, 

Appointment appointment = null;
                appointment = new Appointment(start, end, summary, description, location);


How can I insert the saved RecurrenceRule into the appointment?

appointment.RecurrenceRule.Equals(sRule);     //does not work


Thanks
Dobry Zranchev
Telerik team
 answered on 09 Mar 2010
11 answers
363 views

We've had a request to add a close button to each tab in our MDI docking manager rather than use the TdiCloseButton on the far right of the tabstrip.  This is similar to Internet Explorer and Firefox's tabbed interface.  This is on Q2 2008 SP1.

I've been able to get 99% of the way there but have one nagging little issue I hope you can help with.  Whenever I am creating a new MDI child, I am creating a new RadButtonElement via:

 

private

 

static Telerik.WinControls.UI.RadButtonElement NewButton()

 

{

Telerik.WinControls.UI.

 

RadButtonElement ret = new Telerik.WinControls.UI.RadButtonElement();

 

(ret.Children[

 

0] as Telerik.WinControls.Primitives.FillPrimitive).BackColor = System.Drawing.Color.Transparent;

 

(ret.Children[

 

0] as Telerik.WinControls.Primitives.FillPrimitive).BackColor2 = System.Drawing.Color.Transparent;

 

(ret.Children[

 

0] as Telerik.WinControls.Primitives.FillPrimitive).BackColor3 = System.Drawing.Color.Transparent;

 

(ret.Children[

 

2] as Telerik.WinControls.Primitives.BorderPrimitive).Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

 

ret.MaxSize =

 

new System.Drawing.Size(16,16);

 

ret.Text =

 

"X";

 

ret.ForeColor = System.Drawing.

 

Color.Red;

 

ret.DisplayStyle = Telerik.WinControls.

 

DisplayStyle.Text;

 

ret.Alignment = System.Drawing.

 

ContentAlignment.MiddleRight;

 

 

 

return ret;

 

}

 

 

Then, I add a click handler and increase the ImageTextLayoutPanel's margin to make room for my button and finally add the buttonElement to the children:

 

Telerik.WinControls.UI.

 

TabItem tab = pane.DockableTab as Telerik.WinControls.UI.TabItem;

 

Telerik.WinControls.Layouts.

 

ImageAndTextLayoutPanel layout = tab.Children[2] as Telerik.WinControls.Layouts.ImageAndTextLayoutPanel;

 

layout.Margin =

 

new Padding(0, 0, 20, 0);

 

Telerik.WinControls.UI.

 

RadButtonElement button = NewButton();

 

button.Tag = pane;

button.Click +=

 

new EventHandler(tab_Close);

 

button.MouseEnter +=

 

new EventHandler(closeButton_MouseEnter);

 

button.MouseLeave +=

 

new EventHandler(closeButton_MouseLeave);

 

tab.Children.Add(button);

 

 

What I am seeing whenever I add the button element to the tab is the border on the left of the tab is not painted.  I've played around with a lot of margin/padding and layout settings but can't seem to get the border to show up correctly.  Any suggestions?

Thanks in advance!

Martin Vasilev
Telerik team
 answered on 09 Mar 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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?