Telerik Forums
UI for WinForms Forum
6 answers
497 views
I have a grid and a list view that I need to render with slightly different data based upon buttons a user will press.  The Bound data is not changing, just how I display it.  What I really need is to force the grid to fire off its Cell Formatting or Row Formatting events.  I'm hacking it right now by:

            radGridView1.EnableSorting = false;
            radGridView1.EnableSorting = true;

Which is doing what I want.  Is there a better way?
Hristo
Telerik team
 answered on 14 Mar 2017
1 answer
123 views

Hi,

I am using a drop down button on the command bar. The number of main menu items unknown in advance, it depends on the number of year of records are stored in the local database. On each main menu item, there are fixed amount of submenu items representing 12 months of a year as shown in the attached image.

My question is how can I know a user has pressed the submenu item from its corresponding parent? Let's say user pressed the submenu item 'January' from the the main menu item '2017', hence, I can show each record stored in the database related to January not January 2016 or January  2018 and vice versa.

I have these line of codes in my application which me to detech which month a user has click a subitem. I just can't figuer out how to detech the click is from which parten..

menuItem[j].Items[m].Click += WonderingRecordsForm_MouseDown;

RadMenuItem clickedMenuItem = (RadMenuItem) sender;
Console.WriteLine(clickedMenuItem.Text);

Hristo
Telerik team
 answered on 14 Mar 2017
3 answers
384 views
Hi:
I need hide or quit the default items of my quick access toolbar in ribbonbar.
The default items are "show bellow the ribbon" and "minimize the ribbon"

thanks.
Dimitar
Telerik team
 answered on 14 Mar 2017
2 answers
121 views

Hi, I have a problem with a document, here is what it's going on:

I copy some text from MS Word (THIS TEXT HAS SOME BULLETS) and paste it to the richtexteditor, then I save the content of the document into the database, in a byte array field (this I do it with RTFFORMATPROVIDER).

RtfFormatProvider rtf = new RtfFormatProvider();<br>                string rtfS = rtf.Export(rtfEditor.Document);<br>                byte[] bytes = System.Text.Encoding.Default.GetBytes(rtfS);

Next when I want to show in another screen the document I saved, I show it with RTFFORMATPROVIDER, here what it happens is that I lost the format of the bullets, the bullets are still there but they have a different size and family.

 

<p>byte[] _doc;</p><p>String eTexto = System.Text.Encoding.Default.GetString(_doc);</p><p>RtfFormatProvider rtf = new RtfFormatProvider();<br>                rtfEditor.Document = rtf.Import(eTexto);</p>

 

I know that this is probably because of the way I save the document since the one in MS Word is in .DOC format, and I am saving it in .RTF format.

What I need, is that to find all bullets after the richTextEditor.Import, so I can set the family and size that I want(which is always the same one, TimesNewRoman Size10).

Is there a way to achieve this?

Thanks in advanced.

Hristo
Telerik team
 answered on 13 Mar 2017
1 answer
144 views

How can this be done without looping over all the appointments in the appointments collection? Is there a method like "GetAppointmentsInRange"?

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Mar 2017
8 answers
480 views
Hi,

I use a RadGridView to display my data.
When hovering over the first cell of the first row I show a picture (with Telerik.WinControls.UI.RadOffice2007ScreenTipElement control) by the value of a field in the underlying datasource.
This works fine.

The problem is when I scroll down and I hover again over the first cell of the first row, then I get the same picture (what is wrong because it should be another picture).
I noticed that the ToolTipTextNeeded event doesn't fire anymore for this first row.
When I hover over the first cell of another row (where the ToolTipTextNeeded event has not been fired yet) then it works fine.
So I guess that the ToolTipTextNeeded event only fires if there is not yet a tooltip assigned to that cell.
If that is the case, this is very good because then the picture does not to be rendered all the time but when it's another record that is shown in a row where the tooltip is already set then I would like that the ToolTipTextNeeded fires again
I guess I could do that by setting the GridDataCellElement:Screentip to ? (NULL).
But when can I do that? What event is the best to do this? I tried the scroll-event but it looks like that doesn't fire?
Isn't there some event/property that only fires the first time a particular record from the underlying datasource is shown?

Or I'm i trying to do this in a wrong way?

Remark: isn't there some way to know what events are fired when a form is runned? That way I could try to discover myself what's the best event to do something.

Regards
Didier
Dimitar
Telerik team
 answered on 13 Mar 2017
21 answers
1.7K+ views

I'm trying to add rows automatically and the columns are already created manually in Telerik radgridview, I couldn't add rows dynamically and couldn't make the first row as read only.

 
const int numberOfRows = 5;
    public Form1()
    {
        InitializeComponent();
 
        for (int rowCount = 0; rowCount < numberOfRows; rowCount++)
        {
           radGridView1.Rows.Add();// Problem Here - Index out of range was unhandled
 
            //radGridView1.Rows[0].ReadOnly = true; // problem here
        }
    }

How can i make certain cell alone as read-only in radGridView? Thank you.


How can i make certain cell alone as read-only in radGridView?  I need some help ASAP. Thank you.

I'm uisng Telerik Winforms verison with visual studion 2010 Pro, .net 4 version with original license registered to my company name.
Hristo
Telerik team
 answered on 13 Mar 2017
5 answers
512 views

I'm open to any idea besides using a ListView for this.  (I've thought of using a flow layout panel and RadButton as one alternative.)

In my project where we are picking items for customer orders a "License Plate" is a number that uniquely identifies the box that we are using to put the items that we pick for the order.  There are normally three license plates per order and there could be a few more added as we pick.  The user would like to see all of the license plates in a horizontal row (scrolling won't be a problem) and have the person click one of them to assign whatever quantity of an item to that box.  (That is as simple as a button or something that looks like a button with the license plate number for its text.)

So, if a ListView is a good idea here, I'm trying to use one in IconsView mode to take advantage of the horizontal orientation.  I did this so far...

lvLicensePlates.ViewType = ListViewType.IconsView;
lvLicensePlates.AllowArbitraryItemWidth = true;
lvLicensePlates.AllowArbitraryItemHeight = true;
lvLicensePlates.AllowEdit = false;
lvLicensePlates.AllowRemove = false;
lvLicensePlates.SelectLastAddedItem = false;
lvLicensePlates.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;
lvLicensePlates.ListViewElement.ViewElement.ItemSpacing = 20;

 

I would like to give the items more of the RadButton appearance.  I started experimenting with VisualItemFormatting...

private void LvLicensePlates_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
{
    e.VisualItem.BorderBoxStyle = BorderBoxStyle.SingleBorder;
    e.VisualItem.DrawBorder = true;
     
}

but that hasn't produced a border for me.

If you could first tell me if a different control would be a better choice and, if not, can you help me make the item look like a RadButton (or better, since I suspect that you have better ideas than I would).

 

Thank you,

Gary

 

Hristo
Telerik team
 answered on 10 Mar 2017
2 answers
127 views

Hi, 

we are using the TextBoxControl instead of the TextBox because of the performance. Now I need to add a button/Icon in my TextBoxControl. I have found a solution for the Textbox but could not find any solution for the TextBoxControl. 

 

How can i add a simple Button in my TextBoxControl ??

 

Sincerely,

Dominik

Dominik
Top achievements
Rank 1
 answered on 10 Mar 2017
3 answers
1.1K+ views

I'm using a RadRichTextEditor for WinControls (2017.1.117.40) in my WinForms application and i want to use the RTF text later on in a Stimulsoft Report.

First i import an RTF (created by Winword) from my local machine, it is displayed fine in the TextEditor and in a report designed with Stimulsoft. After i edit the text and try to display it in the report again, the report can't render it anymore as RTF.

I've attached the original text and the changed text as texxtfiles and you can see that there have been put some more tags into the file than in the original.

I'm not using any special propertysettings for the texteditor as far as i know.

So i need the structure as in the Original text, can you help me to figure out what is going wrong here?

Original text:

{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1043\deflangfe1043{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue0;}
{\*\generator Riched20 6.3.9600}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 
\pard\nowidctlpar\cf1\b\f0\fs20 TESTTEKST\b0\par
}

Changed text after adding "test2" in Texteditor:

{\rtf\ansi\ansicpg1252\uc1\deff0\deflang1033{\fonttbl{\f0 Verdana;}{\f1 Arial;}}
{\colortbl\red0\green0\blue0 ;}
{\*\defchp\ltrch\f0\fs24\i0\b0\strike0\cf0\ulc0\ulnone}
{\*\defpap\sl276\slmult1\ql\sa180\ltrpar}{\stylesheet{\s0\sqformat\spriority0\ltrch\f0\fs24\i0\b0\strike0\cf0\ulc0\ulnone\sl276\slmult1\ql\sa180\ltrpar Normal;}{\*\ts2\tsrowd\spriority59\trbrdrt\brdrnone\trbrdrb\brdrnone\trbrdrl\brdrnone\trbrdrr\brdrnone\trbrdrh\brdrnone\trbrdrv\brdrnone\trgaph0\trpaddl75\trpaddr75\trpaddt0\trpaddb0\clpadft3\clpadt0\clpadfr3\clpadr0\clpadfl3\clpadl0\clpadfb3\clpadb0\tsvertalt\ltrch\f0\fs24\i0\b0\strike0\cf0\ulc0\ulnone\sl276\slmult1\ql\sa180\ltrpar Table Normal;}}\nouicompat\viewkind4\paperw12240\paperh15840\margl1425\margr1425\margt1425\margb1425\deftab720\sectd\pgwsxn12240\pghsxn15840\marglsxn1425\margrsxn1425\margtsxn1425\margbsxn1425\headery720\footery720\pard\s0\sl240\slmult1\ql\ltrpar{\ltrch\f1\fs20\i0\b\strike0\cf0\ulc0\ulnone TESTTEKST test2}{\ltrch\f1\fs20\i0\b0\strike0\cf0\ulc0\ulnone\par}}

Hristo
Telerik team
 answered on 10 Mar 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?