Telerik Forums
UI for WinForms Forum
2 answers
138 views
Hello,

is it possible to show lines that mark parent-child relation in self-reference grid, like it's done in RadTreeView by setting ShowLines property to true?
Yury Babaev
Top achievements
Rank 1
 answered on 20 Mar 2012
1 answer
172 views
Can any body help me how to print the telerik rad form.

it seems the code of http://msdn.microsoft.com/en-us/library/6he9hz8c.aspx 
is not working it will print blank data. 

but i try, not in telerik win form and it works.. 

it seems it have a reasons of compatibility of codes or something... 

just give i idea guys... 

TIA>.....


powerUp!!

Stefan
Telerik team
 answered on 19 Mar 2012
8 answers
585 views
Hi guys,

How can i databind the selecteditem/selectedvalue in a Dropdownlist allready bounded to a table.

Table looks like this:
int ID, string Name;

The DropDownlist is binded to a table of values (datasource). The DisplayMember is set to a "Name" and ValueMember is set to "ID".
I want to use the ValueMember in another kind of binding.

So i tried to do like this. radDropDownList1.DataBindings.Add("Value", MyDataObject, "TextID");

But then i found out that the raddropDownList1 do not contain the Property Value, but it have a SelectedValue.

So i tried to do like this. radDropDownList1.DataBindings.Add("SelectedValue", MyDataObject, "TextID");
But this did not work as expected.

So how do i do it?

Regards
Svein Thomas
Julian Benkov
Telerik team
 answered on 19 Mar 2012
3 answers
170 views
Hi All,

I'm using Q3 2001 SP1 and I'm trying to allow users to have an AutoComplete functionality with a GridViewComboBoxColumn element in my GridView.

Documentation here:

http://www.telerik.com/help/winforms/gridview-columns-gridviewmulticomboboxcolumn.html
(at the bottom of the page)

And the API reference here:

http://www.telerik.com/help/winforms/p_telerik_wincontrols_ui_gridviewcomboboxcolumn_filteringmode.html
 
Suggests that the FilterMode/FilteringMode property should be able filter based on the DisplayMember or ValueMember of the GridViewMultiComboBoxColumn or GridViewComboBoxColumn Control. The only properties I can find with "filter" in the name are:

AllowFiltering
AllowFilteringProperty
Filter
FilterDescriptor
PropertyFilter

Has the property been removed? or do I have to access this property another way?

Thanks
Mako
Top achievements
Rank 1
 answered on 19 Mar 2012
1 answer
120 views
Hello Telerik Support Guys,

When I try to paste some text copied from an excel sheet into a RadRichTextBox, it throws exception(exception details are attached with). The same exception comes when you try to copy from text box. However, if you try second time, every thing works fine.
Please help me out.

--Pawan
Svett
Telerik team
 answered on 19 Mar 2012
2 answers
192 views

This must be simple, but I have trouble to get this solved ...

I have a mouse click event proc of which the sender type is a RadTextBoxItem. I need to know the textbox, so type TextBox or RadTextBox. How can this be done?

Marcus
Top achievements
Rank 1
 answered on 19 Mar 2012
3 answers
189 views
Hi,

I use the CommandBar with two CommandBarDropDownList items and I attach the SelectedIndexChanged event.
In the event handler I want to cast the sender object to the CommandBarDropDownList, but this doesn't work, because the sender is a type of RadDropDownListElement.
I need the Tag property from the CommandBarDropDownList item, because I use it in my following code.
If I cast the sender object to the RadDropDownListElement, the Tag property is null!

Is this a bug?

Regards
Marco

Stefan
Telerik team
 answered on 19 Mar 2012
3 answers
135 views
Hi.. again
What event should be used to 'grab' the value of a node... when a user clicks on it?
thanks again.....................
Stefan
Telerik team
 answered on 19 Mar 2012
3 answers
281 views
I create new item class
    public class MyCustomVisualItem : SimpleListViewVisualItem
    {
        private LightVisualElement _contentElementName;
        private LightVisualElement _contentElementState;
 
        private StackLayoutPanel _stackLayoutH;
        private StackLayoutPanel _stackLayoutV;
 
        private ImagePrimitive _image1;
        
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
 
            _stackLayoutH = new StackLayoutPanel
            {
                Orientation = Orientation.Horizontal,
                EqualChildrenWidth = false
            };
 
            _stackLayoutV = new StackLayoutPanel
            {
                Orientation = Orientation.Vertical,
                EqualChildrenWidth = true,
                Margin = new Padding(10,0,0,0)
            };
 
            _image1 = new ImagePrimitive
            {
                Image = (Image)Resource1.ResourceManager.GetObject("Anonymous"),
                Alignment = ContentAlignment.MiddleLeft
            };
            _stackLayoutH.Children.Add(_image1);
 
 
            _contentElementName = new LightVisualElement
            {
                StretchHorizontally = true,
                Alignment = ContentAlignment.MiddleLeft,
                ImageAlignment = ContentAlignment.MiddleLeft,
                TextAlignment = ContentAlignment.MiddleLeft,
                Image = (Image)Resource1.ResourceManager.GetObject("Untitled_1s"),
                TextImageRelation = TextImageRelation.ImageBeforeText
            };
            _stackLayoutV.Children.Add(_contentElementName);
 
            _contentElementState = new LightVisualElement
            {
                StretchHorizontally = true,
                Alignment = ContentAlignment.MiddleLeft,
                TextAlignment = ContentAlignment.MiddleLeft,
                ForeColor = Color.Gray,
            };
            _stackLayoutV.Children.Add(_contentElementState);
 
            _stackLayoutH.Children.Add(_stackLayoutV);
 
            Children.Add(_stackLayoutH);
        }
 
        protected override void SynchronizeProperties()
        {
            base.SynchronizeProperties();
 
            Text = "";
            _contentElementName.Text = Convert.ToString(Data["Name"]);
            _contentElementState.Text = "Life is Good";
 
        }
 
        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(SimpleListViewVisualItem);
            }
        }
    }

add to item creating
 	
	public RadForm1()
        {
            InitializeComponent();
            this.radListView1.Columns.Add("Name");
            this.radListView1.Items.Add(new ListViewDataItem("text"));
            this.radListView1.Items[0]["Name"] = "User";
        }
 
        private void radListView1_VisualItemCreating(object sender, Telerik.WinControls.UI.ListViewVisualItemCreatingEventArgs e)
        {
            e.VisualItem = new MyCustomVisualItem();
        }
 
        private void radListView1_SelectedItemChanged(object sender, EventArgs e)
        {
            int s = 2;
        }
Action radListView1_SelectedItemChanged in ListView doesn't work when i click on LightVisualElement element in my custom ListView item.
When click on free space in the item or on ImagePrimitive element all work and selected item changing.
How can i fix it?
Stefan
Telerik team
 answered on 19 Mar 2012
4 answers
286 views
Hi guys,

I'm working on a program where I need to change Text and ToolTips of different RadRibbonBar Elements.
The reason for this is that I need to be able to change the language on the fly.
This came as a request for an already existing program.
As the language will be changed for the whole program and all windows, I wanted to use a public function,
that will be called when I press a button and when a window is loaded / get the focus.
The Language information itself is stored in a database table.


private void radButtonElementEnglish_Click(object sender, EventArgs e)
{
     ChangeLanguage(this, "English")
}


Changing Text  and ToolTips on Textbox, RadTextBox or other controls is no problem. I just can't find a way to iterate though a RadRibbonbar. Same counts for Tooltips on a RadGridView.
I added further table columns that hold names and types of RibbonBarElements as kind of a path to get to an element.
"radRibbonBar.ribbonTab.radRibbonBarGroup", "radRibbonBar<Form.Name>.ribbonTabMain.radRibbonBarGroupSave"
Still din't find a way to diretcly address a RadButtonElement for example.

public void ChangeLanguage(Form frm, String Language = "English")
{
 RadTextBox RadTextBoxTip = null;
 RadDropDownListCustom radDropDownListCustomTip = null;
 RadLabel radLabelTip = null;
 RadButtonElement radButtonElementTip = null;
 RadGridView radGridViewTip = null;
 SqlCommand commandGetData = null;
 try
 {
    commandGetData = SQLQuery();
    commandGetData.CommandText = "SELECT  Element_Name, Element_Typ, Element_Text_EN, ToolTip_Text_EN, Element_Text_DE, ToolTip_Text_DE, From Language WHERE Windowr_Name = @Window_Name";
    commandGetData.Parameters.AddWithValue("@Window_Name", frm.Name.ToString());
    commandGetData.Connection.Open();
    SqlDataReader DataReader = commandGetData.ExecuteReader();
    if (DataReader.HasRows)
    {
         while (DataReader.Read())
    {
     switch (DataReader["Element_Typ"].ToString())
     {
       case ("radTextBox"):
          RadTextBoxTip = (RadTextBox)frm.Controls.Find(DataReader["Element_Name"].ToString(), true)[0];
          if (Language == "English")
          {
        RadTextBoxTip.Text = DataReader["Element_Text_EN"].ToString();
        RadTextBoxTip.TextBoxElement.TextBoxItem.ToolTipText = DataReader["ToolTip_Text_EN"].ToString();
          }
          if (Language == "German")
          {
        RadTextBoxTip.Text = DataReader["Element_Text_DE"].ToString();
        RadTextBoxTip.TextBoxElement.TextBoxItem.ToolTipText = DataReader["ToolTip_Text_DE"].ToString();
          }
          break;
       case ("radLabel"):
            radLabelTip = (RadLabel)frm.Controls.Find(DataReader["Element_Name"].ToString(), true)[0];
        // same as radtextbox
        //radLabelTip.Text
        //radLabelTip.LabelElement.ToolTipText
        break;
       case ("radRibbonbonbar"):
        //..
        RadRibbonBar RadRibbonbarTip = (RadRibbonBar)frm.Controls.Find(DataReader["Element_Name"].ToString(), true)[0];
        //RadRibbonbarTip.Text = ..
        //No Tooltip here
        break;
       case ("ribbonTab"):
        //..
        break;
       case ("radButtonElement"):
            var c = GetAll(frm, typeof(RadRibbonBar));
        MessageBox.Show("Total Controls: " + c.Count());
        break;
       //more case:
       default:
        break;
     }
    }
    DataReader.NextResult();
       }
    commandGetData.Connection.Close();
      }
      catch (System.Data.SqlClient.SqlException ex)
      {
    // showEvents(ex);
      }
      finally
      {
    if (commandGetData != null) { commandGetData.Dispose(); }
      }
   }
 }
 
public IEnumerable<Control> GetAll(Control control, Type type)
{
   var controls = control.Controls.Cast<Control>();
   return controls.SelectMany(ctrl => GetAll(ctrl, type))
  .Concat(controls)
  .Where(c => c.GetType() == type);
}

There is another thread has some info but I'm still not able to figure out how to solve my problem
http://www.telerik.com/community/forums/winforms/ribbonbar/findcontrol-to-find-a-radbuttonelement.aspx


many thanks,
-Michael

Michael
Top achievements
Rank 1
 answered on 19 Mar 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)
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
ProgressBar
CheckedDropDownList
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?