Telerik Forums
UI for WinForms Forum
2 answers
254 views

Hi,

 

I read your article "Adding a WinForms control to a Ribbon Bar" https://www.telerik.com/support/kb/winforms/details/adding-a-winforms-control-to-a-ribbon-bar

Is there also a simple way to add such a control in place of a RibbonTab.

 

Thank you in Advance

Kind Regards,
Dominik

Dominik
Top achievements
Rank 1
 answered on 12 Mar 2020
16 answers
1.1K+ views
We are working with Telerik radgrid .Net Win form controls. Basically ours is a data driven application where a scenario occurs as follows

 The grid  has  select all check box column in the radgridview in which the user able to “select” and “Unselect” thorough the header checkbox but when sorting is applied on the checkbox header cell ,the "Select All"  feature works in a odd way (not all rows are getting selected /unselected). Is there any workaround for this?

Regards
Julian
Akarsh
Top achievements
Rank 1
 answered on 12 Mar 2020
1 answer
119 views

When I programmatically use go to bookmark on the richtexteditor the bookmark is shown on the editor in the bottom of the page is there a way to show on the top of the page?

I attached two pictures to explain batter the first one how the method gotobookmark is working and the second how i would like to be.

Thanks!

Vladislav
Telerik team
 answered on 10 Mar 2020
2 answers
118 views
I have implemented a code which draws certain lines (MapPolyline) on a RadMap element. How to determine if drawn polygon (MapPolygon) crosses the line? 
Roman Kurdadze
Top achievements
Rank 1
 answered on 09 Mar 2020
2 answers
184 views

First of all I really like the new VirtualKeyboard and it is doing a good job so far.

Nethertheless I've found an issue that the keyboard is not opening below the associated control the first time it is shown.
After closing and reopening the keyboard it is on the correct position. This behaviour only occurs on the right half of the screen.

Is this a bug or am I doing anything wrong?

Attached you can find a sample project.

Dimitar
Telerik team
 answered on 09 Mar 2020
1 answer
1.0K+ views

I have the following code snippet

 byte[] pdfAsByteArray = File.ReadAllBytes(@"D:\a_images\2_b.jpg");
 Stream stream = new MemoryStream(pdfAsByteArray);
 radPdfViewer.LoadDocument(stream);

There is no issue with the image or with the image permissions but it is not displaying in the radpdfviewer

Dimitar
Telerik team
 answered on 09 Mar 2020
1 answer
119 views

Hello.
after applying localization with RadSchedulerLocalizationProvider on radScheduler, the returned value of reminder was wrong.
for example the "5 minutes" changed to "5 hours" in my database.

in greek "5 minutes" is "5 λεπτά" 
applied culture is set to "el-GR".

Thank you.

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Mar 2020
1 answer
267 views

Hallo,

I have Winforms Application.

I created WPF-UserControl.

I'm trying to add this WPF-UserControl (per elementHost) to one of RadElement in my Winforms Form.

It could be RadPanelElement or my custom class extending RadElement.

Is it possible, and if it is possible how can i add, place WPF-UserControl on RadElement?

Or how can i prepare my custom radElement which will show WPF-UserControl?

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Mar 2020
3 answers
206 views

Having a bizarre issue with RadGridView where it seems to randomly be selecting items in the grid when the underlying ObservableCollection is changed.  My desired behavior is the "CurrentItem" becoming null when the selected item is removed from the underlying collection, and obviously for the GridView not to select an item when added when the selection is blank.  My code is as follows:

radGridView1.AutoExpandGroups = true;
            var gd = new GroupDescriptor();
            gd.GroupNames.Add("RandomProp1", ListSortDirection.Ascending);
            radGridView1.GroupDescriptors.Add(gd);
            var sd1 = new SortDescriptor("RandomProp2", ListSortDirection.Descending);
            radGridView1.SortDescriptors.Add(sd1);
            var sd2 = new SortDescriptor("RandomProp3", ListSortDirection.Ascending);
            radGridView1.SortDescriptors.Add(sd2);
            radGridView1.MultiSelect = false;
            radGridView1.DataBindingComplete += RadGridView1_DataBindingComplete;
            radGridView1.DataSource = App.MasterList;

private void RadGridView1_DataBindingComplete(object sender, Telerik.WinControls.UI.GridViewBindingCompleteEventArgs e)
        {
            Log.WriteLine("RadGridView_DataBindingComplete");
            radGridView1.CurrentRow = null;
            radGridView1.CurrentRowChanged += RadGridView1_CurrentRowChanged;
        }

 

When the underlying collection is being changed, I'm doing the following:

BeginInvoke on the main thread

Locking the collection

Updating items as such:

DynamicCollection[i] = new CustomObject(fillerProperties);

 

Is the above possibly the issue?  I know this is the correct way to update ObservableCollections in WPF when bound to a GridView, not sure if WinForms behaves differently.

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Mar 2020
2 answers
128 views

When using GridView in Hierarchy mode with a Template and binding to BindingList for Children:

 

public class Parent
{
    public Parent()
    {
        children = new BindingList<Child2>();
    }
 
    public int Id { get; set; }
 
    public string Prop1 { get; set; }
 
    public BindingList<Child2> children { get; set; }
}
 
 
public class Child2 : INotifyPropertyChanged
{
    public int Id { get; set; }
 
    public string Prop1 { get; set; }
 
    private int _Prop2;
    public int Prop2
    {
        get { return this._Prop2; }
        set
        {
            if (this._Prop2 != value)
            {
                this._Prop2 = value;
                if(PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs("Prop2"));
            }
        }
    }
 
    public string Prop3 { get; set; }
 
    public event PropertyChangedEventHandler PropertyChanged;
}

 

If there is grouped columns in child template, changing properties is not reflected:

public partial class Form1 : Form
   {
 
       BindingList<Parent> data;
       public Form1()
       {
           InitializeComponent();
           InitGrid();
 
           data = new BindingList<Parent>();
 
           for (int i = 0; i < 3; i++)
           {
               Parent parent = new Parent() { Id = i, Prop1 = "testProp" + i };
               for (int j = 0; j < 4; j++)
               {
                   Child2 child = new Child2() { Id = i * j, Prop1 = "testProp" + i, Prop2 = j % 2, Prop3 = "another" };
                   parent.children.Add(child);
               }
 
               data.Add(parent);
           }
 
           this.radGridView1.DataSource = data;
           this.radGridView1.CellDoubleClick += radGridView1_CellDoubleClick;
 
       }
 
       void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e)
       {
           Child2 child = e.Row.DataBoundItem as Child2;
           MessageBox.Show(child.Prop2.ToString());
       }
 
       private void InitGrid()
       {
           this.radGridView1.Columns.Add(CreateColumn("Id"));
           this.radGridView1.Columns.Add(CreateColumn("Prop1"));
 
 
           GridViewTemplate template = new GridViewTemplate();
           template.AllowAddNewRow = false;
           template.AllowDeleteRow = false;
           template.AllowEditRow = false;
           template.AutoGenerateColumns = false;
 
 
           template.Columns.Add(CreateColumn("Id"));
           template.Columns.Add(CreateColumn("Prop1"));
           template.Columns.Add(CreateColumn("Prop2"));
           template.Columns.Add(CreateColumn("Prop3"));
 
 
           GridViewRelation r = new GridViewRelation(this.radGridView1.MasterTemplate, template);
           r.ChildColumnNames.Add("children");
 
           template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
 
           template.EnableFiltering = false;
           template.EnableGrouping = true;
           template.ShowColumnHeaders = true;
           template.ShowRowHeaderColumn = false;
 
 
           this.radGridView1.EnableGrouping = false;
           this.radGridView1.EnableCustomGrouping = false;
 
 
           GroupDescriptor gd = new GroupDescriptor();
           gd.GroupNames.Add("Prop2", ListSortDirection.Ascending);
           gd.GroupNames.Add("Prop3", ListSortDirection.Ascending);
 
 
           template.GroupDescriptors.Add(gd);
 
 
           this.radGridView1.Templates.Add(template);
 
           this.radGridView1.Relations.Add(r);
           this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
       }
 
       GridViewTextBoxColumn CreateColumn(string Field)
       {
           GridViewTextBoxColumn col = new GridViewTextBoxColumn();
           col.Name = Field;
           col.FieldName = Field;
           col.HeaderText = Field;
           return col;
       }
 
       private void button1_Click(object sender, EventArgs e)
       {
           this.data.First().children.First().Prop2 = 1;
       }
   }

When I Click Button1 nothing happens

Is this a bug or am I doing something wrong?

 

 

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Mar 2020
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
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?