Telerik Forums
UI for WinForms Forum
3 answers
329 views

I have a RadGridView which I've used the property builder to add several groups to.When I hide the group, it hides the columns within the group on screen, however when I export the grid to excel, the columns within the group are still visible.

Is there anyway of fixing this so that if the group is hidden, the columns within the group are not exported?

I already have:

        Dim exporter As ExportToExcelML = New ExportToExcelML(Me.grid)
        exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport
        exporter.SheetName = "Export"
        exporter.SummariesExportOption = SummariesOption.DoNotExport
        Dim filename As String = "C:\Export.xls"
        exporter.RunExport(filename)

Thanks in advance for any help.
Dimitar
Telerik team
 answered on 26 Feb 2016
5 answers
2.0K+ views
Hello Telerik Team,
i am developing a solution in which user adds his defined columns to the gridview and the number of columns not limited to some number, there may be 'n' number of columns, my question is when user gives a very long text for the header , i want to wrap the text to some confined width in the header
i wonder there is no vertical stretch to header ,i tried bestFit, autosize everything but unable to find the answer


i want to wrap the header text something like below, is this possible ?????


can you please help me out
RIZAL
Top achievements
Rank 1
 answered on 25 Feb 2016
4 answers
377 views

Hello,

 

is there a way to change the width of specific GridViewIndentColumns? I'm trying to hide the very first IndentColumn in a Grid with 2 group levels. So far i tried changing one (or a combination) of the following 3 properties without any success:

private void GridView_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
    var indentColumn = e.CellElement.ColumnInfo as GridViewIndentColumn;
    if (indentColumn != null)
    {
        switch (indentColumn.IndentLevel)
        {
            case 0:
                e.CellElement.Size = new Size(0,e.CellElement.Size.Height);
                indentColumn.Width = 0;
                e.CellElement.Visibility = ElementVisibility.Collapsed;
                return;
            case 1:
                indentColumn.Width = 20;
                e.CellElement.Size = new Size(20, e.CellElement.Size.Height);
                e.CellElement.Visibility = ElementVisibility.Visible;
                break;
        }
    }
}

Andreas Haeusler
Top achievements
Rank 2
 answered on 24 Feb 2016
2 answers
174 views

Hi,

By inserting a radial gauge on my Form, the gallery is empty and I cannot select any type of gauge.

I have run the upgrade wizard for Winform and manually added the controls I want into the toolbox.

Why is the gallery empty ?

Thans for your help

 

 

Ralitsa
Telerik team
 answered on 24 Feb 2016
12 answers
405 views
Hello Support,
I have a datasource to bind in GanttView. Some of my items have no start date and end date. By default, ganttView doesn't display the null date items. 
May you please help me t display them in the Ganttview?
Hristo
Telerik team
 answered on 23 Feb 2016
2 answers
537 views
Documentation says "Fires after the current cell has changed", but it seems to that it is giving me the cell address of the previously selected cell. Is there some event that I can get that actually gives me the cell AFTER it has changed?
 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Feb 2016
0 answers
155 views

Helloo all ... 

How to fill textbox from MCCB selected to textbox ...

 

thanks

Hengky
Top achievements
Rank 1
Veteran
 asked on 23 Feb 2016
3 answers
151 views

Hi,

I have a HtmlViewDefinition that is added to a grid so as to provide detail information for a row, similar to your example in http://www.telerik.com/help/winforms/gridview-overview.html except I only have a single row defined in the HtmlViewDefinition

This works OK, but I need to enable column headers which I do by setting 

template.ShowColumnHeaders = True

and then for each column setting

template.Columns(column.FieldName).HeaderText

This seems to enable the headers OK and they are displayed but I have a problem with the header row height. It appears to consume the entire row height for the HtmlViewDefinition.RowTemplate.Row I have added and I can't find a way to modify it.

Is there a way to change the header row height?

Thanks,

Mark.

 

 

Hristo
Telerik team
 answered on 22 Feb 2016
0 answers
247 views

I'm posting this for anyone who comes across this same issue.

As of Q1 2015 SP1, the CommandBarToggleButton has been changed with respect to how it behaves when disabled. If you want toggle buttons to look the same as regular buttons when disabled, you need to set the UseDefaultDisabledPaint property to true and also handle the EnabledChanged event to turn off or on the DrawBorder and DrawFill properties.

        private void toggleSelectMode_EnabledChanged(object sender, EventArgs e)
        {
            ((Telerik.WinControls.UI.CommandBarToggleButton)sender).DrawBorder = ((Telerik.WinControls.UI.CommandBarToggleButton)sender).Enabled;
            ((Telerik.WinControls.UI.CommandBarToggleButton)sender).DrawFill = ((Telerik.WinControls.UI.CommandBarToggleButton)sender).Enabled;
        }

Without these steps, when you disable a toggle button you'll see one or all of the following

  • the buttons stay in color (not grayed out) 
  • the border of the button visible
  • the background of the button go gray instead of just the icon

In the attached image, all of the command bar buttons have Enabled set to false. The controls look as expected except for the toggle buttons. If you follow the steps given in this post, they'll look as expected too.

Good luck all!

Chris

 

 

Chris Vaughn
Top achievements
Rank 1
 asked on 19 Feb 2016
2 answers
315 views

Hi everyone. We have a child grid that is bound to data as requested. We have added a GridViewCheckBoxColumn to the row, but we can't seem to edit it?

Here we set the child element:

grdCustomers.DataSource = contact.GetList(true, 0);
grdCustomers.Templates.Add(CreateChildTemplate());
The CreateChildTemplate method looks like this:

private GridViewTemplate CreateChildTemplate()
{
    var template = new GridViewTemplate();
    template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    template.AllowEditRow = true;
    template.ReadOnly = false;           
 
    var select = new GridViewCheckBoxColumn("CheckBox");
    var field1 = new GridViewTextBoxColumn("Field1");
    var field2 = new GridViewTextBoxColumn("Field1");
    
    select.ReadOnly = false;
    select.DataType = typeof(bool);
    select.EditMode = EditMode.OnValueChange;           
     
    template.Columns.AddRange(select, field1, field2);
 
    return template;
}

Then we bind the data to the child grid

var row = e.Template.Rows.NewRow();
 
row.Cells["Field1"].Value = dataRow.Field1;
row.Cells["Field2"].Value = dataRow.Field2;
row.Cells["Select"].Value = dataRow.Select;
row.Cells["Select"].ReadOnly = false;
 
e.SourceCollection.Add(row);

No watter what we have tried, we can't get the checkbox to be editable?

Please advise.

Thank you.

 

 

 

Hristo
Telerik team
 answered on 19 Feb 2016
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?