Telerik Forums
UI for WinForms Forum
1 answer
170 views

Hello

I want to be able to modify the text content of the control programmically at runtime. Below is the code I have tried :

 Placeholder does not change the content
 Dim content_controls As IEnumerable(Of SdtRangeStart) =
        Me.radRichTextEditor1.Document.GetAnnotationMarkersOfType(Of SdtRangeStart)()
        For Each item In content_controls
            'MsgBox("Type: {0} ID:{1}", item.SdtProperties.Type, item.SdtProperties.ID)
            'MsgBox("Type: {0} ID:{1}", item.SdtProperties.Type, item.SdtProperties.ID)

            If item.SdtProperties.Type = SdtType.Text Then

                Dim properties As TextProperties = TryCast(item.SdtProperties, TextProperties)
                If properties.Tag IsNot Nothing AndAlso properties.Tag.ToUpper = "SERIALNO" Then
                    properties.Placeholder.PlaceholderText = "DWF324434244242"
                    properties.Placeholder.ShowPlaceholder = True
                End If
            End If
        Next
Thank You
Dimitar
Telerik team
 answered on 07 Sep 2021
21 answers
1.0K+ views
Radgridview's columns have default filter operation as "Contains :" .  How can i change them to "Start with".

Best Regards,
Kenghot
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Sep 2021
1 answer
170 views

Hello,

I am doing the following to rename a worksheet:

                Worksheet workSheet = sheetReturns.SpreadsheetElement.Workbook.Sheets.Add(SheetType.Worksheet) as Worksheet;
                workSheet.Name = "Missing Top 100";
                dtProvider.Import(_missingTop100, workSheet);
                sheetReturns.SpreadsheetElement.Workbook.ActiveWorksheet = workSheet;
                workSheet.Columns[workSheet.UsedCellRange].AutoFitWidth();

The new name of the sheet does not show unless another worksheet is added or I double click on the worksheet tab.

How can I code this so the new name shows immediately?

Thanks,
Doug

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Sep 2021
2 answers
210 views
Hi, I am using the following line of code to set FilterDescriptors.Expression programatically from a string in SQL-like format:

this.portfolioGrid.FilterDescriptors.Expression = newFiltersExpr;

I discovered the following issue when using a string like 

src_sec_prim_id in ('4008030','4008032','4010014','4025022','4029402','4032004','4150008','4150009','4150010','4150011','4150012')

Note that all the items in the above list have single quotes around them.  But the resulting FilterDescriptors.Expression looks like this:

[src_sec_prim_id] IN (4008030,4008032,4010014,4025022,4029402,4032004,4150008,4150009,4150010,4150011,4150012)

That is, all the single quotes got eliminated! I imagine the issue is the setter of FilterDescriptors.Expression recognizes all the items as numbers and decides to remove the single quotes.

To test this, I used a list that has some items that could not be mistaken for numerical, and indeed this did not happen!

This is an undesirable behavior for me, since I later need to use the FilterDescriptors.Expression to construct an actual SQL query, that breaks if the single quotes are absent.

Would you advise anything that could help me override this behavior?

Thank you!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Sep 2021
1 answer
197 views

I have a RadMenu in a new application where I set the Font property to "Segoe UI 9pt". While all the top-level menu items appear as expected, the drop-downs revert back to "Segoe UI 8.25pt".  Aren't the Font properties ambient? I really don't want to have to explicitly set all the RadMenuItem.Font properties.

What am I missing?

As a related follow-up, I would have expected the RadMenu, RadCommandBar, and RadStatusStrip's Font properties to be ambient also, and default to the Form's Font.

This is day two of my evaluation of the library.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Sep 2021
2 answers
121 views

Hello,

I came across a weird behavior of a winforms application when using MS Windows setting of Display Scale to 125%.

After exporting a radgridview to an Excel file, the application shrinks. Controls' sizes are smaller and Captions don't fit anymore.

See attachments with a state before exporting and after. I also included a sample app. It only happens with a Display Scale larger than 100%.

Best regards,

Tomáš

Tomáš
Top achievements
Rank 1
Iron
 answered on 31 Aug 2021
2 answers
196 views

Hi,

I want to apply two different font styles for the hostwindow title text in Winforms RadDock. For example, If the title is "Tools - Crop", then it should be like below

Tools - Crop

 

Is it possible to achieve this?

 

Thanks

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Aug 2021
1 answer
288 views

Hai EveryOne,

i have a problem from my grafik chart line series..
i want to set no blur if the grafik vertical, but if the line horizontal. the line not blur when zoom..

how this solustionn,,,

tihis is source code section

 

 LineSeries series = new LineSeries();
            series.CategoryMember = "MonthName";
            series.ValueMember = "TotalAsset";
            series.DataSource = m_LineChartList;
            series.PointSize = new SizeF(7, 7);
            series.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            //test
            //series.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            //series.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
            //series.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
            //series.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
            series.Padding = new Padding(20);
            series.IsVisible = true;
            series.LinesToLabelsColor = Color.FromArgb(0, 0, 0);

            series.BackColor = Color.FromArgb(0, 50, 0);
            series.BorderColor = Color.FromArgb(0, 50, 0);

 

 

 

thanks every one

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Aug 2021
2 answers
235 views

I have a radgridview that I've enabled pasting.  Everything works great but for some reason when I right click and hit paste no matter how many rows I'm coping the pasting event fires twice thus duplicating the input rows.

private void RgvSup_Pasting(object sender, Telerik.WinControls.UI.GridViewClipboardEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                // paste row data
                if (RgvSup.CurrentRow is GridViewNewRowInfo)
                {
                    if (Clipboard.GetText() != string.Empty && Clipboard.GetText() != "")
                    {
                        string[] lines = Clipboard.GetText().Split(new string[] { "\r\n" }, StringSplitOptions.None);
                        try
                        {
                            foreach (string rowInfo in lines)
                            {
                                string[] cellVal = rowInfo.Split('\t');
                                if (cellVal.Length >= 9)
                                {
                                    SUPPLIER ObjSup = new SUPPLIER();
                                    try { ObjSup.SUP_NAME = cellVal[0]; } catch { }
                                    if (cellVal[1].Contains(";"))
                                        cellVal[1] = cellVal[1].Split(';').GetValue(0).ToString();
                                    try { ObjSup.SUP_PUL_CAT_ID = decimal.Parse(cellVal[1]); } catch { ObjSup.SUP_PUL_CAT_ID = null; }
                                    try { ObjSup.SUP_PHONE = ClsCommon.SetPhone(cellVal[2]); } catch { }
                                    try { ObjSup.SUP_PCONT_NAME = cellVal[3]; } catch { }
                                    try { ObjSup.SUP_PCONT_CCELL = ClsCommon.SetPhone(cellVal[4]); } catch { }
                                    try { ObjSup.SUP_ADDRESS = cellVal[5]; } catch { }
                                    try { ObjSup.SUP_CITY = cellVal[6]; } catch { }
                                    if (cellVal[7].Contains(";"))
                                        cellVal[7] = cellVal[7].Split(';').GetValue(0).ToString();
                                    try { ObjSup.SUP_ST_ID = decimal.Parse(cellVal[7]); } catch { ObjSup.SUP_ST_ID = null; }
                                    try { ObjSup.SUP_ZIP = ClsCommon.SetZip(cellVal[8]); } catch { }
                                    ObjSup.SUP_CL_ACTIVE_ID = 1;

                                    MstEnt.eSUPPLIER.Add(ObjSup);
                                }
                            }
                        }
                        catch
                        {
                            MessageBox.Show("Incompatible DataSources");
                        }

                        ClsCommon.SaveMstEnt(MstEnt, "RpurfEditSup.cs", "RgvSup_Pasting");
                        RefreshData();
                        MessageBox.Show("Completed");
                    }
                }
            }
            catch (Exception Ex)
            {
                ClsCommon.WriteAppError(Ex, "RpurfEditSup.cs", "RgvSup_Pasting");
            }
            Cursor.Current = Cursors.Default;
        }

 

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Aug 2021
1 answer
112 views

my actual width is 3.14 inch but the print not in the correct size 

using code

rvInvoiceViewer.PrintReport()

Nadya | Tech Support Engineer
Telerik team
 answered on 24 Aug 2021
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?