Telerik Forums
UI for WinForms Forum
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
176 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
214 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
198 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
124 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
202 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
290 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
242 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
114 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
1 answer
182 views

Greetings,

I have got some questions about the  GridViewPdfExport object:

Question 1: I set ExportVisualSettings property to true, but it doesn't apply cells' back and fore colors when exporting to PDF. My associated RadGridView's cells are colorful (columns are in different back and fore colors) and I need the GridViewPdfExport object to export the RadGridView customization the same way a RadPrintDocument does.

Question 2: For some of my clients, I'm using Arabic and Persian languages (and fonts) in my RadGridViews. When using GridViewPdfExport object, texts are Spell Backwards . For example, if first column's header text is "نام", it exports it as "م ا ن ". I tired exporting data using ExportToPDF object, Handling the HTMLCellFormatting event as it is documented in the RadFridView PDF export documentations, but I guess it only supports left-to-right languages, or maybe, I'm not using an appropriate Unicode font in this case (I also tried Arial Unicode MS, but the texts are printed like ####-##). What's the solution for the languages I mentioned ?

 

 


Nadya | Tech Support Engineer
Telerik team
 answered on 23 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
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
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?