Telerik Forums
UI for WinForms Forum
5 answers
1.1K+ views
Looking for a simple way to turn off the border drawing for the RadTextBox; since the control is based on the Microsoft Textbox I expected there to be a BorderStyle property but there isn't, making a composite control and the looking at using the RadTextBox on the control to take advantage of some of the AutoCompleteXXX properties. Any help how to turn off the border wonder be appreciated.

Thank you in advance.
Stefan
Telerik team
 answered on 26 Jul 2013
4 answers
1.8K+ views
I've read many forum entries regarding clearing the text in a DateTimePicker and also showing the Clear and Today buttons.  So I have tested with this code and made things work well enough so far.

public Form1()
 {
     InitializeComponent();
     RadDateTimePickerCalendar datePickerCalendarBehavior = (this.dtpTest.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar);
     RadCalendar calendar = datePickerCalendarBehavior.Calendar;
     calendar.ShowFooter = true;
     calendar.CalendarElement.CalendarStatusElement.Text = "";
     datePickerCalendarBehavior.DropDownMinSize = new Size(250, 250);
     dtpTest.NullableValue = null;
     dtpTest.NullDate = System.Convert.ToDateTime("01/01/0001");
     dtpTest.NullText = " ";
 }
 private void dtpTest_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Delete)
     {
         dtpTest.SetToNullValue();
         e.Handled = true;
     }
 }

The text clears when I press the Delete key and the calendar shows the Clear and Today buttons.

1. What's the Clear button supposed to do?  Am I supposed to handle the event myself or is it supposed to clear out the date?  I don't see anything happening when I click that, even without handling the KeyDown event.

2. From the older forum posts I've read, I think that maybe there is a way to use the properties of the RadDateTimePicker to clear the text without having to extend the control and add a KeyDown handler and other property settings.  Is there some way to do that via the properties of the control now?

Thank you,
Gary



Stefan
Telerik team
 answered on 26 Jul 2013
1 answer
167 views
Hello support !

When changing the property sort to categorized or not, the vertical scroll bar is always displayed, even when not needed.

To reproduced:
 - create a form with a property grid.
 - set ToolbarVisible to true
 - add some properties, but not enough to cause the scroll bar to appear.
 - start and click on the sort button: the sort is changed, but the scroll bar became visible even if it is not needed.
George
Telerik team
 answered on 26 Jul 2013
1 answer
97 views
How to do that would result displayed when editing the line if the line read is still in edit mode?
Paul
Telerik team
 answered on 25 Jul 2013
3 answers
406 views
I have a user control with a TableLayoutPanel that has two columns (and one row).  One column is autosize, the other is absolute.  There is a RadLabel in the cell in the autosize column.  I'm programmatically loading a number of these user controls onto a FlowLayoutPanel.  They resize their widths if the user resizes the form.

I'm loading the text on the RadLabel from the database.  I would like to make the label figure out its size (width = FlowLayoutPanel's column width, height = whatever it takes to contain the text).  Then fix the height of the FlowLayoutPanel and the user control to be able to contain that RadLabel.

I have been looking all over the forum but I haven't figured out the magic combination of properties and calculations to make this work.  Can it be done?

Thank you,
Gary
Paul
Telerik team
 answered on 24 Jul 2013
1 answer
121 views
I have a form with RadButtons and RadSpitButtons. I use the office2010SilverTheme.
If a disable the Buttons, the text is shown gray. When I disable the RadSplitButton the text is still black, also the arrow is black and the Image on the button keeps the origin colors. It's not clear for the user, that the button is disbaled, because only the border color changed.
Is it planed to change the standard theme or do  I need to create my own theme?
Thanks in advance
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jul 2013
1 answer
207 views

I am trying to use an Autocompletebox similar to a list view.  I am doing this because of its compact form and look and feel.  I am not using the Auto complete or suggestion options.  I am using a separate dialog box to populate the control with data.  I am also wanting use this control as an attachment manager.  Something similar to the way outlook presents attachments.

Populating the control seems to be fairly easy.  Although I would have expected a function to add to the internal collection rather than just an append method.

Here is how I am populating my AutoCompleteBox.

private void BuildCCList()

{

       radCCList.Clear();

       foreach(Contact curContact in m_objTicket.CCList)

       {

              radCCList.AppendText(curContact + ";");

                          

             

       }

}

 

This works pretty good; but, when I attempt to access those objects in the delete functions I have issues.  I am not able to cast the item being deleted back to my Contact Class.  It seems that the internal collection for the Autocompletebox is strings only.  There seems to be a value field but I have not figured out how to set that.

 

((RadAutoCompleteBoxElement)this.radCCList.TextBoxElement).Items.CollectionChanged += Items_CollectionChanged;

 

private void Items_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)

{

       if (e.Action == NotifyCollectionChangedAction.Remove)

       {

                          

              foreach(object objContact in e.NewItems)

              {

                     Contact removeContact = (Contact)objContact;

                     m_objTicket.CCList.Remove(removeContact);

                                 

              }

       }

}

Is there any other way of populating the control that would allow me to add my custom objects to the internal list?  Is there another control that I may be able to get a similar look and feel from?   In the end I am looking for a compact list of objects that can be add to and deleted from with a minimal foot print on the form.

Any help would be appreciated.

 

 

Dimitar
Telerik team
 answered on 24 Jul 2013
4 answers
168 views
I am using a combination of normal and custom filtering in the RadGridView control.  When the user clears the text out of a filter box in the filtering row the grid still filters as if the box still had text in it.

In the attached image you can see that two rows show up in the grid initially.

After the filter value Contains "T" is entered the first row is correctly filtered.

When I clear that filter box the first row remains hidden.  The only way to get the grid to show the row again is to set the filter type to "No Filter" and then back to "Contains".

Here is the sample code:
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
 
            radGridView1.CustomFiltering += radGridView1_CustomFiltering;
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            radGridView1.MasterTemplate.Columns.Clear();
             
            GridViewTextBoxColumn v1Col = new GridViewTextBoxColumn("Value1");
            v1Col.Name = "Value1";
            radGridView1.MasterTemplate.Columns.Add(v1Col);
 
            GridViewTextBoxColumn v2Col = new GridViewTextBoxColumn("Value2");
            v2Col.Name = "Value2";
            radGridView1.MasterTemplate.Columns.Add(v2Col);
 
            radGridView1.MasterTemplate.EnableFiltering = true;
            radGridView1.MasterTemplate.EnableCustomFiltering = true;
            radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
 
            BindingList<Thing> stuff = new BindingList<Thing>();
            stuff.Add(new Thing("One", "Two"));
            stuff.Add(new Thing("Filter", "Two"));
            stuff.Add(new Thing("Three", "Four"));
 
            radGridView1.DataSource = stuff;
        }
 
        private void radGridView1_CustomFiltering(object sender, Telerik.WinControls.UI.GridViewCustomFilteringEventArgs e)
        {
            if ((e.Row.DataBoundItem as Thing).Value1 == "Filter")
            {
                e.Visible = false;
            }
            e.Handled = !e.Visible;
        }
    }
 
    public class Thing
    {
        public string Value1 { get; set; }
        public string Value2 { get; set; }
 
        public Thing(string val1, string val2)
        {
            Value1 = val1;
            Value2 = val2;
        }
    }
Ivan Petrov
Telerik team
 answered on 24 Jul 2013
3 answers
358 views

How to Invoke best fit column by programmatically,
I tried all below but no success

 

 

 


RP_Grid.PivotGridElement.BestFitHelper.BestFitColumn(New PivotGroupNode(RP_Gri)
RP_Grid.PivotGridElement.BestFitHelper..BestFitRowHeaders()
RP_Grid.PivotGridElement.BestFitHelper.BestFitRowHeaders(2)
RP_Grid.PivotGridElement.BestFitHelper.BestFitRowHeaders(1)
RP_Grid.PivotGridElement.BestFitHelper.BestFitColumns()

 

Please help me on this.Very urgent

 

 

 

 

 

 

Peter
Telerik team
 answered on 24 Jul 2013
5 answers
72 views
Hello,

I have a table in a MySQL database that is getting hit via a Stored Procedure inside of a MySQL database.  The column type is a BIT(1) which according to the MySQL documentation is the correct way to implement a Boolean field into the database.  I don't really want to hard code the columns in to allow for some flexibility.  I would hate to have to update this GUI every time I add something new to the database.

I went to one of the BIT columns that are located in the RadGridView and it appears to be an Numeric column because the range of accepted values is -79228162514264337593543950335 to 79228162514264337593543950335.   Not to sound like a wise guy, but putting anything other than 0 or 1 into a BIT(1) column will cause the database to have an aneurysm.

Any help is much appreciated.
Stefan
Telerik team
 answered on 24 Jul 2013
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?