Telerik Forums
UI for WinForms Forum
3 answers
340 views

I might be a newbie to Telerik Winform controls.

I have a rad grid view displaying from a data source. for each row there are two buttons i.e approve and reject. I need to selectively approve or reject each row. On Click of a save button i have to save them back to database.

I have Boolean field in table to which value is based on approve or reject button. The default value is false. I want only to save the database rows that i have modified that too on save button click.Can I have any flag to selectively get only the rows modified at radgrid so that i can retrieve them and save them on save button click.

I worked on it did not work out, in My version  because  every save would save each and every rows if was modified on rad data grid or not.

I'd be thankful if someone helps me in this issue.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Nov 2017
3 answers
95 views

hello

When the dropdownlist is set to right to left = yes, the mouse pointer in it is like a dot. Guide me?  I use telerik Q2 2014

thank you

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Nov 2017
0 answers
110 views
I have a gridview with data that constantly are refreshed(quantities...), when the user have one row selected and i refresh the information, the grid loss the selected row and move to other position,there is some property that allows managment these kinds of situations easily? i just want to refresh the information and that the user dont have problems when the focus change between rows due to change the datasorce.
thanks in advance.
m
Top achievements
Rank 1
 asked on 26 Nov 2017
2 answers
141 views

Is it possible to add a subitem to a menu of a splitbutton?

I need a hierarchy like this:

load

---category a

------file 1

------file 2

------.....

---category b
------file 1
------file 2
------.....

save

insert

...

 

Thanks in advance!

Elke

 

 

Elke
Top achievements
Rank 1
 answered on 25 Nov 2017
8 answers
1.3K+ views
Do you want to change the font of all parts radgridview
If you can change the font of all the controls are pretty good
example
hard7
Top achievements
Rank 1
 answered on 25 Nov 2017
5 answers
443 views
I can't seem to recreate the treeview example that shows a layout having nodes with different ItemHeight values.  The RadTreeView seems to only respect the ItemHeight that is set at on the treeview itself and not the values of the child nodes.  Is there a flag some where to respect the different nodes property values?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Nov 2017
1 answer
147 views

Hi,

can i draw a rectangle in radDiagram with mouse,  like Ms Paint?

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Nov 2017
3 answers
396 views

Hello Support,

  I am having trouble with custom sorting accessing values that were set using cellformatting().  I have a Gridview that is databound to a custom class,  AutoGenerateColumns = false, adding columns using grid.MasterTemplate.Columns.Add(), using CellFormatting() to populate the data on some of the columns that are not in the custom class.

Values that are assigned from the databound class show up ok, but the Values that were assigned using CellFormatting() are always null.  

How can I access the values set using CellFormatting() { e.CellElement.Text = "X"} ?

Thanks

void grid_CustomSorting(object sender, GridViewCustomSortingEventArgs e)
        {
            foreach (var descriptor in e.Template.SortDescriptors)
            {
                if (uicomponents != null && !String.IsNullOrEmpty(descriptor.PropertyName) )
                {
                    var customcolumn = uicomponents.FirstOrDefault( ui => ui.FriendlyName.Equals(descriptor.PropertyName));
                    if (customcolumn != null)
                    {
                        int result = 0;
                        System.Diagnostics.Debug.WriteLine(descriptor.PropertyName);
 
                        try
                        {
                            //var cellValue1 = (string)e.Row1.Cells[descriptor.PropertyName].Value;
                            //var cellValue2 = (string)e.Row2.Cells[descriptor.PropertyName].Value;
 
                            var cellValue1 = (string)e.Row1.Cells[descriptor.PropertyIndex].Value;
                            var cellValue2 = (string)e.Row2.Cells[descriptor.PropertyIndex].Value;
 
                            if (cellValue1 == cellValue2)
                            {
                                result = 0;
                            }
                            else if (cellValue1 != null)
                            {
                                result = 1;
                            }
                            else if (cellValue2 != null)
                            {
                                result = -1;
                            }
                        }
                        catch
                        {
 
                        }
                        e.SortResult = result;
                        e.Handled = true;
                        return;
                         
                    }
                    else
                    {
                        //Check here if the value for cells that are databound are populated.
                        var cellValue1 = (string)e.Row1.Cells[descriptor.PropertyIndex].Value;
                        var cellValue2 = (string)e.Row2.Cells[descriptor.PropertyIndex].Value;
 
                        //This actually works.
                        System.Diagnostics.Debug.WriteLine(cellValue1 + " " + cellValue2);
                    }
                }
            }
 
            e.Handled = false;
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Nov 2017
3 answers
684 views

Hi Telerik forum,
I began to use the RichTextEditor to create programmatically a radDocument (so i use the paragraph, span, section object to create it).
Once the document is shown, users can insert formatted paragraph to personalize the document. The html text paragraph are stored in database in html format.

The thing i need is to be able to insert formatted html paragraph into this raddocument already generated.
My problem is to evaluate all the html text (with differents tags inside it, span, table, tr etc). I use the HtmlFormatProvider that works perfectly but it produce a new raddocument. So i tried to convert the htmlformatprovider document into a DocumentFragment, but i have to use fragment.EnumerateChildrenOfType(Of object) and explicitly specify the object type (what i wouldn't do).
What's the best approach to insert html text into an existing raddocument ?

Thanks for your help, hoping that my question is clear.

Here's my sample code : 

Dim document As New RadDocument
Dim section As New Section
 
Dim p9 As New Paragraph
Dim presta1 As New RadDocument
Dim msgHtml = New Html.HtmlFormatProvider
presta1 = msgHtml.Import("<SPAN><STRONG>Table content :</STRONG></SPAN><TABLE STYLE='border:1px solid black'><TR><TD>Marque</TD><TD>Type</TD><TD>N° série</TD><TD>Fluide</TD></TR><TR><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD></TR><TR><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD></TR></TABLE>")
 
Dim fragment = New DocumentFragment(presta1)
section.Blocks.Add(fragment.EnumerateChildrenOfType(Of Table).ToList.First) 'its working but only with Table tag
 
'Saut de ligne
section.Blocks.Add(New Paragraph)
 
document.Sections.Add(section)
return document

Vipul
Top achievements
Rank 1
 answered on 23 Nov 2017
4 answers
68 views

The following sample code creates a RadRibbonBar\RibbonTab\RadRibbonBarGroup\RadSplitButtonElement UI structure.

Clicking on the radSplitButtonElement1 button causes the click handler (radSplitButtonElement1_Click) to be called twice.

Tested in R3 2017. This is not how it worked in Q1 2013, where the handler was called once.

Is this a bug or an intended change in behavior?

using System;
using System.Diagnostics;
using Telerik.WinControls.UI;
 
namespace wf7
{
    public partial class RadForm1 : RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
 
            RadMenuItem mni1 = new RadMenuItem("item1", 1);
            this.radSplitButtonElement1.Items.Add(mni1);
            this.radSplitButtonElement1.DefaultItem = mni1;
            mni1.Click += radSplitButtonElement1_Click;
 
            RadMenuItem mni2 = new RadMenuItem("item2", 2);
            this.radSplitButtonElement1.Items.Add(mni2);
            mni2.Click += radSplitButtonElement1_Click;
        }
 
        private void radSplitButtonElement1_Click(object sender, EventArgs e)
        {
            Debug.Print("invoked menu item");
        }
    }
    partial class RadForm1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.radRibbonBar1 = new Telerik.WinControls.UI.RadRibbonBar();
            this.ribbonTab1 = new Telerik.WinControls.UI.RibbonTab();
            this.radRibbonFormBehavior1 = new Telerik.WinControls.UI.RadRibbonFormBehavior();
            this.radRibbonBarGroup1 = new Telerik.WinControls.UI.RadRibbonBarGroup();
            this.radSplitButtonElement1 = new Telerik.WinControls.UI.RadSplitButtonElement();
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // radRibbonBar1
            //
            this.radRibbonBar1.CommandTabs.AddRange(new Telerik.WinControls.RadItem[] {
            this.ribbonTab1});
            //
            //
            //
            this.radRibbonBar1.ExitButton.Text = "Exit";
            this.radRibbonBar1.Location = new System.Drawing.Point(0, 0);
            this.radRibbonBar1.Name = "radRibbonBar1";
            //
            //
            //
            this.radRibbonBar1.OptionsButton.Text = "Options";
            this.radRibbonBar1.Size = new System.Drawing.Size(292, 162);
            this.radRibbonBar1.TabIndex = 0;
            this.radRibbonBar1.Text = "radRibbonBar1";
            //
            // ribbonTab1
            //
            this.ribbonTab1.IsSelected = true;
            this.ribbonTab1.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.radRibbonBarGroup1});
            this.ribbonTab1.Name = "ribbonTab1";
            this.ribbonTab1.Text = "tab1";
            this.ribbonTab1.UseMnemonic = false;
            //
            // radRibbonFormBehavior1
            //
            this.radRibbonFormBehavior1.Form = this;
            //
            // radRibbonBarGroup1
            //
            this.radRibbonBarGroup1.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.radSplitButtonElement1});
            this.radRibbonBarGroup1.Name = "radRibbonBarGroup1";
            this.radRibbonBarGroup1.Text = "radRibbonBarGroup1";
            //
            // radSplitButtonElement1
            //
            this.radSplitButtonElement1.ArrowButtonMinSize = new System.Drawing.Size(12, 12);
            this.radSplitButtonElement1.DefaultItem = null;
            this.radSplitButtonElement1.DropDownDirection = Telerik.WinControls.UI.RadDirection.Down;
            this.radSplitButtonElement1.ExpandArrowButton = false;
            this.radSplitButtonElement1.Name = "radSplitButtonElement1";
            this.radSplitButtonElement1.Text = "radSplitButtonElement1";
            this.radSplitButtonElement1.Click += new System.EventHandler(this.radSplitButtonElement1_Click);
            //
            // RadForm1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(292, 270);
            this.Controls.Add(this.radRibbonBar1);
            this.FormBehavior = this.radRibbonFormBehavior1;
            this.IconScaling = Telerik.WinControls.Enumerations.ImageScaling.None;
            this.Name = "RadForm1";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "radRibbonBar1";
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private RadRibbonBar radRibbonBar1;
        private RadRibbonFormBehavior radRibbonFormBehavior1;
        private RibbonTab ribbonTab1;
        private RadRibbonBarGroup radRibbonBarGroup1;
        private RadSplitButtonElement radSplitButtonElement1;
    }
}

 

ddd

Alex
Top achievements
Rank 1
 answered on 22 Nov 2017
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?