Telerik Forums
UI for WinForms Forum
16 answers
889 views
Hi all,

I am pretty sure it is very easy to achive but I just can't find it.

I have an application that uses quite a lot of CollapsiblePanels but it also uses Tabs and so the layout has a lot of borders that make the whole stuff look a bit... restless.
So I want to hide the border of the CollapsiblePanels without having to mess with the theme (the tool uses a theme manager and the user can switch between some of the custom themes) so I need to hide the borders in general.

How can I do that?

Kind regards,
Gabriele
Martin
Top achievements
Rank 1
 answered on 27 Nov 2019
2 answers
367 views

hello Telerik!

can i change hamburger menu (☰) to my own icon/png and show another icon when menu expand?

another question: like css, set animation to change icon/png/svg for collapse/expand ?

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Nov 2019
9 answers
561 views
I want to hide and show the radpageview backstage menu when i press the button and it will get collapse and free up the space on screen and then same button press again it will show up the menu .. Second thing i wants two buttons when i press first one the menu will move down and when press second button the menu will move up and in last i want a back button on each page of radpageview which take to previous page.. I attach the sample of behavior from rad demo application. I need implementation as done in demo app. Thanks. 
Nadya | Tech Support Engineer
Telerik team
 answered on 26 Nov 2019
5 answers
303 views
I am using conditional formatting on multiple columns, setting the background color based on the value in the cell.

Conditions are if value of cell is Between 0.23 and 3.41, set background color to Yellow.

This works well until in one column the cell value >= 10.0 and it starts to highlight the cell again.
Dimitar
Telerik team
 answered on 26 Nov 2019
2 answers
220 views
grid export function

WINFORMS
    gridview ver: 2019.3.917.40

What happens is the excel doc ends up with only the one sheet, the 2nd one.
Why?
What am I doing wrong?

I send in;
     a grid Telerik.WinControls.UI.RadGridView objGrid
     SheetName
     NbrOfGrids
    
Calling code!
     strDocToOpen = exportGrid(radGrid1, "sheetname1", 2);
     strDocToOpen = exportGrid(radGrid2, "sheetname2", 2);
    
     Call to Open strDocToOpen
    

EXPORT Function code!

// export the grid to an excel file
Telerik.WinControls.Export.GridViewSpreadExport exporter = new Telerik.WinControls.Export.GridViewSpreadExport(objGrid)
{
    ExportFormat = Telerik.WinControls.Export.SpreadExportFormat.Xlsx
};
Telerik.WinControls.Export.SpreadExportRenderer exporterRenderer = new Telerik.WinControls.Export.SpreadExportRenderer();

exporter.SheetName = strSheetName;   

// if more then one grid to be in exceldoc
if (intNbrOfGrids > 1)
{
    exporter.FileExportMode = Telerik.WinControls.Export.FileExportMode.NewSheetInExistingFile;
};

string strPathToMyDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
strFileName = "MyDoc";

exporter.RunExport(strPathToMyDocuments + @"\" + strFileName + ".xlsx", exporterRenderer);
 
Returns  (strPathToMyDocuments + @"\" + strFileName + ".xlsx")
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 25 Nov 2019
2 answers
363 views

I have been trying to turn a stacked barchart to be horizontal - and must be misunderstand what must be a simple solution to my problem.

using the Telerik Example for a stacked barChart - how do I set this so that the Representatives are on the vertical axis and the performance values are on the bottom horizontal axis as shown in the attached image.

Thank you in advance

            Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
            barSeries.Name = "Q1"
            barSeries.DataPoints.Add(New CategoricalDataPoint(177, "Harley"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(128, "White"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(143, "Smith"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(111, "Jones"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(118, "Marshall"))

            Dim barSeries2 As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
            barSeries2.Name = "Q2"
            barSeries2.DataPoints.Add(New CategoricalDataPoint(153, "Harley"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(141, "White"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(130, "Smith"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(88, "Jones"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(109, "Marshall"))
            RadChartView2.Series.Add(barSeries2)
            barSeriesQ1.CombineMode = ChartSeriesCombineMode.Stack
            barSeries2.CombineMode = ChartSeriesCombineMode.Stack

 

Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 25 Nov 2019
7 answers
831 views

Hello I can't find how to programmatically add controls into a RadCollapsibleControl

From the documentation I thought I should add to the
    CollapsiblePanelLayoutElement

But I do not find access to this element.

Thanks in advance

Pierre-Jean

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Nov 2019
7 answers
1.3K+ views

I am trying to export a RadGridView to excel and running into a few hiccups. I've been able to to work around these but would like to know if there is a better approach I could/should take. 

1.) When exporting to excel the RadGridView seems to only support .xls extension rather than .xlsx. These means the first time the user opens the file in excel they get prompted to reformat and re-save. To work around this currently I am using excel interop to open the file in the back ground and re-save it as .xlsx.

    Is there a way to save it directly as a .xlsx?

2.) The export method of the RadGridView appears to only support saving directly to a file.

     Can the export be streamed so that it is opened with out having to create a temp file so that when saved the user is forced to select a save location and name (this may be more of an issue with excel rather than telerik)?

3.) I did not see an option to be able to export and preserve pinned columns and pinning the headers in the excel file, currently doing this using excel interop.

    Is there a way to export with pinned columns pinned in the excel file and pinning the header row?

 

Below is the approach I am currently taking to accomplish the above would like to be able to clean it up if there are any built in options.

public static void ExportToExcel(this RadGridView grid)
        {
            Microsoft.Office.Interop.Excel.Application excel = null;
            Workbooks wbs = null;
            Workbook wb = null;
            Sheets sheets = null;
            Worksheet sheet = null;
            Window activeWindow = null;
             
            var fileName = string.Format("{0}-{1}", "SoftproExtract", DateTime.Now.ToString("yyyyMMdd-hhmmss"));
            var extension = "xls";
            string tempPath = string.Format("{0}{1}.{2}", Path.GetTempPath(), fileName, extension);
            string userPath = string.Empty;
 
            try
            {
                var exporter = new ExportToExcelML(grid) { HiddenColumnOption = HiddenOption.DoNotExport, HiddenRowOption = HiddenOption.DoNotExport, ExportVisualSettings = true, SummariesExportOption = SummariesOption.DoNotExport };
                 
                exporter.RunExport(tempPath);
 
                excel = new Microsoft.Office.Interop.Excel.Application { Visible = false, Interactive = false };
                excel.DefaultFilePath = "";
                wbs = excel.Workbooks;
                wb = wbs.Open(tempPath);
                sheets = wb.Sheets;
                sheet = sheets[1];
 
                 
                sheet.Activate();
                activeWindow = excel.ActiveWindow;
                activeWindow.SplitRow = 1;
                activeWindow.SplitColumn = grid.Columns.Count(x => x.PinPosition == PinnedColumnPosition.Left);
                activeWindow.FreezePanes = true;
 
                extension = "xlsx";
                userPath = string.Format("{0}\\{1}.{2}", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), fileName, extension);
                wb.SaveAs(userPath, XlFileFormat.xlWorkbookDefault);
            }
            catch (Exception ex)
            {
                ex.WriteLog();
                ex.Show();
            }
            finally
            {
                if(wb != null)
                    wb.Close();
                if(excel != null)
                    excel.Quit();
 
                Marshal.ReleaseComObject(activeWindow);
                Marshal.ReleaseComObject(sheet);
                Marshal.ReleaseComObject(sheets);
                Marshal.ReleaseComObject(wb);
                Marshal.ReleaseComObject(wbs);
                Marshal.ReleaseComObject(excel);
 
                if (File.Exists(tempPath))
                    File.Delete(tempPath);
            }
 
            if (File.Exists(userPath))
                Process.Start(userPath);
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Nov 2019
2 answers
116 views

I have a RadForm with RadCollapsiblePanel docked left and a RadStatusStrip on bottom docked.

How is it possible to dock/fix the Statusbar complete on bottom and dock the CollapsiblePanel on the StatusBar?

The CollapsiblePanel is always left to the StatusBar and resize it.

Martin
Top achievements
Rank 1
 answered on 25 Nov 2019
14 answers
1.8K+ views
I edited the UI element for a DropDownButton by setting the Shape of the RadDropDownButtonElement to roundRectShape1.  It is working just fine.  However, there is still a square border outside each corner as shown in the attached file.  How can I get rid of this?
jiang
Top achievements
Rank 1
 answered on 25 Nov 2019
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?