Telerik Forums
UI for WinForms Forum
3 answers
144 views

I'm having issues with the theming of the RadDropDownList using the VisualStudio2012Light theme. I've set my RDDL to have a height of 20px and without theming the text vertically centers normally and there are no hassles whatsoever. As soon as I apply the theme then things start getting pear shaped.

The RDDL automatically adjusts its height to 24px which is not what I want. This mismatches all the other controls I have with the same theme - none of them resize when the theme is applied.

When I adjust the height of the RDDL to 20px after the theming has been applied the height adjusts fine but the text remains in the same position and gets cut off. The offset doesn't adjust.

I know in the past themes have been buggy at times but this is the first time I've come across this particular issue. I can say for certain that with 2013.2.724.40 this wasn't an issue but after checking some other versions it was also a problem in 2015 Q2.

I'm using VS2012, .NET 4.0. The attached image shows:

1. How the text is cut off

2. How the RDDL resized itself

3. How the RDDL compares to a RadTextBox and a RadDateTimePicker

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jan 2016
2 answers
145 views

Hi,

I have a problem with unselecting the new Row in my grid.

To explain the problem, i have a grid, where the user can add data to by using the new Row.

When clicking the new Row, it gets populated with some default data and can be edited.

I wanted to make sure the edited data gets saved when the user leaves the new Row,

so i used the UserAddingRow event to open a MessageBox to ask the user if he wants to save.

If yes, all right.

If no, I use e.Cancel to reject the data.

=> At this point I would like the new Row to change back to the initial "Click here to add new row" state,

but it stays selected or defined as CurrentRow. The data is gone, but an empty row stays as long as I don't switch to

another row manually, even when the data bound to the grid changes.

I can't find a way to unselect the row or set CurrentRow = null, as it seems not to be possible out of the event.

Also there seems to be no other event to hook up to after UserAddingRow when cancelled.

 

Maybe there is an easy way of unselecting, or maybe I'm using the wrong event for that purpose.

I would be glad for some help. :)

  

01.private void RadGridViewClockTimeUserAddingRow(object sender, GridViewRowCancelEventArgs e)
02.        {
03.            var result = RadMessageBox.Show(
04.                this,
05.                Resources.DoYouWantToSaveNew,
06.                Resources.Save,
07.                MessageBoxButtons.OKCancel);
08. 
09.            if (result == DialogResult.OK) return;
10. 
11.            e.Cancel = true;
12.            // CurrentRow = null ??
13.        }

Bjoern
Top achievements
Rank 1
 answered on 19 Jan 2016
1 answer
105 views

I recently upgraded the telerik controls from 2011.2.11.831 to 2015.1.331.20 and I am having an issue with the group by feature of the radgridview. Is this a known issue, and if is then is there a way to fix this?

grid1.png: The screen is stretched, the vertical scroll bar is clearly visible on the right.

grid2.png: As I reduce the width of the screen, the vertical scrollbar comes in with it as expected.

grid3.png: At this point the horizontal scroll bar is visible but the vertical one is not. This is with the horizontal scrollbar all the way to the right. Some content is also cut off.

grid4.png: This is how it looks before the telerik controls were updated to 2015.1.331.20.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jan 2016
3 answers
432 views

I'm sure this question has been asked a 1000 times, but this will make 1001. I have a RadGridView and for the purposes of this discussion let make it a single column grid. I set the columntype to GridViewCommandColumn. Let's pretend I have 5 rows of data. On even numbered rows I DON'T want a button or any other editor/control. I just want a readonly bit of text to show (or no text at all for that matter). Basically, I want to change the even numbered rows/cells to a different cell type. In this case I want a readonly textbox or something similar. More generically, I want to know how to change individual cells at both design and runtime. Is this doable? If so, I could sure use some guidance.

Thanks ... Ed

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jan 2016
1 answer
846 views

I have a Windows application written in VB.Net.  It has a RadDropDownList control that has Items added to it at Design time.

I would like to Filter the items in the RadDropDownList control or disable/enable some items in the RadDropDownList control depending on the data in the other controls on the WinForm.

I have tried looking at the documentation but it is not clear on how to filter the RadDropDownList or find some items to be enabled or disabled in the RadDropDownList when the control has items added at design time not at runtime.

I am using version 2015.3.1104.40 of the RadDropDownList.

 Please help.  Thanks!

Hristo
Telerik team
 answered on 18 Jan 2016
2 answers
405 views

I need to hide the "Editing & Proofing" and "Styles" group, achieved hide tab.

Sorry for my bad English

Jorge
Top achievements
Rank 1
 answered on 18 Jan 2016
1 answer
1.1K+ views

I'm going to fill my RadGridView by using multiple threads. My code is as follows but is not working. How can I do this?

BackgroundWorker[] workers = new BackgroundWorker[2];
 
        private void frmTest_Load(object sender, EventArgs e)
        {
            for (int col = 0; col < 300; col++)
                grid.Columns.Add("Col " + col.ToString());
 
            for (int r = 0; r < 2; r++)
            {
                workers[r] = new BackgroundWorker();
                workers[r].DoWork += new DoWorkEventHandler(Worker_DoWork);
                workers[r].RunWorkerCompleted += new RunWorkerCompletedEventHandler(Worker_RunWorkerCompleted);
                workers[r].RunWorkerAsync(grid.MasterView);
            }
        }
 
        void Worker_DoWork(object sender, DoWorkEventArgs e)
        {
            var rnd = new Random();
            var info = (GridViewInfo)e.Argument;
            var row = new GridViewDataRowInfo(info);
            int i = 0;
            foreach (GridViewCellInfo cell in row.Cells)
            {
                cell.Value = i++;
 
                cell.Style.NumberOfColors = 1;
                cell.Style.BackColor = Color.FromArgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255));
                cell.Style.CustomizeFill = true;
            }
 
            e.Result = row;
        }
 
        void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            grid.Rows.Add((GridViewDataRowInfo)e.Result);
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Jan 2016
3 answers
184 views

I am attempting to move multiple selected items between Telerik ListView controls. If I was doing this with a Winforms Listbox, it would look like this:

private void button1_Click(object sender, EventArgs e)
{
    for(int x = listBox1.SelectedIndices.Count - 1; x>= 0; x--)
    {
        int idx = listBox1.SelectedIndices[x];
        listBox2.Items.Add(listBox1.Items[idx]);
        listBox1.Items.RemoveAt(idx);
    }
}
However, SelectedIndices does not seem to be available. I've tried to use SelectedItems, but my attempts either yield exceptions (because the index was changed at the first delete) or incorrectly listed items in the target list (again because of previous item removals). How does one do this with two Telerik ListView controls? Thanks.

 

 

Hristo
Telerik team
 answered on 18 Jan 2016
10 answers
673 views
Is it possible to select an item in a ListView using the mouse right button?

Thanks,

Javier Gonzalez de Aragon
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Jan 2016
1 answer
212 views

I want to set the current cell after performing a ResetBindings to allow seemless keyboard entry.  In my example code below I would like to be able to edit the Name column after tabbing out of the Age column.  The row appears highlighted but I must navigate to a different row before I can continue editing

 

public class MyData : IComparable
       {
       public int Age { get; set; }
       public string Name { get; set; }
 
       public MyData ()
           {
           }
 
       public MyData (string name, int age)
           {
           Name = name;
           Age = age;
           }
 
       public int CompareTo (object obj)
           {
           var other = obj as MyData;
 
           if (other == null)
               return 0;
 
           if (this.Age > other.Age)
               return 1;
 
 
           if (this.Age < other.Age)
               return -1;
 
           return 0;
           }
       }

private List<MyData> m_dataSource;
private BindingSource myDataBindingSource = new BindingSource();
 
public Form1()
    {
    InitializeComponent();
    this.radGridView1.MasterTemplate.DataSource = myDataBindingSource;
    m_dataSource = PopulateData ();
    this.myDataBindingSource.DataSource = m_dataSource;
    radGridView1.CellEndEdit += radGridView1_CellEndEdit;
    }
 
void radGridView1_CellEndEdit(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
    {
    var data = this.radGridView1.CurrentRow.DataBoundItem as MyData;
    m_dataSource.Sort();
    myDataBindingSource.ResetBindings(false);
 
    if (data != null)
        {
        foreach (var row in this.radGridView1.Rows)
            {
            if (row.DataBoundItem == data)
                {
                row.IsCurrent = true;
                }
            else
                {
                row.IsCurrent = false;
                }
            }
        }
    }
 
private List<MyData> PopulateData ()
    {
    List<MyData> dataList = new List<MyData> ();
 
    dataList.Add (new MyData ("A", 1));
    dataList.Add (new MyData ("B", 7));
    dataList.Add (new MyData ("C", 3));
    dataList.Add (new MyData ("D", 5));
    dataList.Add (new MyData ("E", 15));
 
    return dataList;

 

    }

Dimitar
Telerik team
 answered on 18 Jan 2016
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?