Telerik Forums
UI for WinForms Forum
3 answers
349 views
Please see my attach screenshot.

As you can see i have 3 nodes and values.
All i want to achieve is to order all 3 values in same position for example:

Destination address:                   FF:FF:FF:FF:FF:FF
Source address:                          00:00:00:00:00:00
Protocol:                                      ARP (0x0806)

My current behavior is:

Destination address: FF:FF:FF:FF:FF:FF
Source address: 00:00:00:00:00:00
Protocol: ARP (0x0806)

How can i do that ?


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Oct 2014
2 answers
302 views
Hello

I'm using CellFormatting event to color some cells in my RadGridView. On Form_Load it works fine (see first image). But when I sort the RadGridView it messes the whole thing up (see second image). You can see my code here:

if (e.Column.Name == "va" && e.CellElement.Value != null)
{
    if ((e.CellElement.Value.ToString() == "P" && e.Row.Cells["id"].Value.ToString() == "1") ||
        (e.CellElement.Value.ToString() == "A" && e.Row.Cells["id"].Value.ToString() == "1") ||
        (e.CellElement.Value.ToString() == "E" && e.Row.Cells["id"].Value.ToString() == "1"))
    {
        e.CellElement.DrawFill = true;
        e.CellElement.BackColor = Color.Red;
        e.CellElement.NumberOfColors = 1;
    }

    else if (e.CellElement.Value.ToString() == "P" || e.CellElement.Value.ToString() == "A" || e.CellElement.Value.ToString() == "E")
    {
        e.CellElement.DrawFill = true;
        e.CellElement.BackColor = Color.Orange;
        e.CellElement.NumberOfColors = 1;
    }
}

Any suggestions how to fix this?

Thanks in advance
Danilo
Top achievements
Rank 1
 answered on 29 Oct 2014
6 answers
365 views
Is it possible to create a right click Rad context menu in the designer with submenu items?  Or can it only be done in code.

Is there any suitable rad menu that can be created in the designer with sub menus and be used as a right click menu?

Otherwise I can use the standard .Net menu I guess.

Thanks
Dimitar
Telerik team
 answered on 29 Oct 2014
1 answer
111 views
team, i have a rad gridview with two combo boxes, the first combo is prepopulated with categories and the second combo box should populate with the subCategories based on the first combo box for each row. Also when an user changes the first combo box value then the second combo box should update its datasource per row.
Dimitar
Telerik team
 answered on 29 Oct 2014
5 answers
129 views
Hi,

Is there a way to make an appointment on the calendar appear as a simple solid green bar (rectangle)?

The rectangle needs to start exactly at the event start time and end at the end time and ideally be without any type of fancy shading/background (just a plain rectangle). Ideally, the width of the rectangle would cover the whole width of the cell (assuming no other appointments overlapping the same time period).

Thanks,

-Lou
Lou
Top achievements
Rank 1
 answered on 28 Oct 2014
1 answer
254 views
I need to use manual crud in my context.

How do I get the values of the cells in the row being update.

private void radGridView1_CellEndEdit(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
        {
            //TextBox t1 = RadGridView1.MasterGridViewInfo.CurrentRow.Cells("Company").Value.ToString();
            //TextBox t2 = RadGridView1.MasterGridViewInfo.CurrentRow.Cells("something").Value.ToString
 
             
             
             {
                 using (var cn = new SqlConnection(connString))
                 {
                     cn.Open();
                     try
                     {
                         SqlCommand cmd = new SqlCommand("UPDATE myTable SET Column = @Parm1 WHERE Col = @Parm2", cn);
                         var parm1 = cmd.CreateParameter("Parm1");
                         parm1.Value = t1.Text;
                         var parm2 = cmd.CreateParameter("Parm2");
                         parm2.Value = t2.text;;
                         cmd.Parameters.Add(parm1);
                         cmd.Parameters.Add(parm2);
                         int rowsAffected = cmd.ExecuteNonQuery();
                     }
                     catch (SqlException ex)
                     {
                         //MessageBox.Show(ex.StackTrace);
                     }
                 }
             
             }
        }

1) The first two lines of code above is what I use to implement in radgrid for asp. How do I get those values in this context winforms?
2) I also have added a delete button column. I do I code the event to delete the row where the button is clicked?

Thanks
Dimitar
Telerik team
 answered on 28 Oct 2014
5 answers
160 views
Sorry for asking such simple think but for some reasons I am not coming right.
I have a dropdownList that gets populated with the table names: 

public  void FillDropDownList(string connString)
        {
            String Query = "SELECT * FROM information_schema.tables where Table_Name like 'Table%'";
            using (var cn = new SqlConnection(connString))
            {
                cn.Open();
                DataTable dt = new DataTable();
                try
                {
                    SqlCommand cmd = new SqlCommand(Query, cn);
                    SqlDataReader myReader = cmd.ExecuteReader();
                    dt.Load(myReader);
                }
                catch (SqlException e)
                {
                   //TODO
                }
                radDropDownList1.DataSource = dt;
                radDropDownList1.ValueMember = "TABLE_NAME";
                radDropDownList1.DisplayMember = "TABLE_NAME";
            }
        }

On selectedIndexChanged of the DropDownList I need to fill in the GridView preserving all functionalities (add, update, delete). Basically the table gets choose at runtime. I am not coming right with this and I would appreciate if can point me to a solution or give me a snippet for this.

Thanks
Dimitar
Telerik team
 answered on 28 Oct 2014
9 answers
194 views
I wonder how to edit Node text, currently F2 edit all the Node and not only Node text:

radTreeView1.AllowEdit = true;
radTreeView1.BeginEdit();
RadTreeNode ethernetNode = radTreeView1.Nodes.Add("Ip address: 0.0.0.0");

Note that i am not using bound but just regular node creation like in my code example, please see my screenshot, can i edit only my text ? (in my example this is 0.0.0.0)
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Oct 2014
1 answer
178 views
I have a loaded Gridview with multiple GridViewColumnGroups and I am trying to use SaveLayout/LoadLayout unsuccessfully. I have read ALL the documentation concerning the RadGridView Serialization API but somehow I can't figure out how or even if it's possible.

Can someone shed some light? I'm getting ready to jump out my window!

Thanks!
Stefan
Telerik team
 answered on 28 Oct 2014
2 answers
213 views
Is there a control for WinForms or a way of constructing "Switch" type buttons as below within Telerik ?



Thanks

Terry
Stefan
Telerik team
 answered on 28 Oct 2014
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?