Telerik Forums
UI for WinForms Forum
3 answers
77 views
I've run into a number of times now where I find myself having to refer to a column by its name, which rubs me the wrong way; for example, the following snippet to run through and check whether or not all of the selected cells are in the same column:

allDataCells = true;
foreach (GridViewCellInfo cell in commandGridView.SelectedCells)
{
    if (cell.ColumnInfo.Name != "columnData")
    {
        allDataCells = false;
        break;
    }
}

It bugs me that I'm using the text name rather than the actual column variable.  I know, in my example scenario, that the column variable is actually "gridViewTextBoxColumn8" (which could be a better name, I know).

Other than comparing on the name variables, which is a little better:

 

gridViewTextBoxColumn8.Name == cell.ColumnInfo.Name

...is there a "good" way to do this?  When given a GridViewCellInfo item, what's the type-safe and typo-safe way to compare the column?

Thanks!
Dave

Julian Benkov
Telerik team
 answered on 01 Jul 2011
1 answer
145 views
Is it possible to clone a GridViewDataColumn?
Julian Benkov
Telerik team
 answered on 01 Jul 2011
2 answers
63 views
I am just starting to work with the window form controls.  I am using the Rad Page View control (Backstage View).  Working with the designer, I only have these options under ThemeName (Reset, ControlDefault).

How do I enable the other prepackaged themes?  I think I can use one of the pre-packaged themes for my needs, I just can't find the switch.

Thanks for the help.

Tim
Nikolay
Telerik team
 answered on 01 Jul 2011
1 answer
119 views
Hello,

I am exporting the contents of a RadGridView to an Excel file and would like to freeze (or pin) the grid header and first column in the Excel file.  I am aware that RAD ASP.NET controls can do this, but am unaware of how this can be accomplished with WinForms.

I have attempted setting the the "IsPinned" value for these rows/columns to true, but this does not affect the Excel file.  Nor are there any options or events on either the grid or the ExportToExcelML object.

Please let me know as soon as possible, my deadline is drawing very near.
Martin Vasilev
Telerik team
 answered on 01 Jul 2011
5 answers
228 views
Hello,
I need to export radGridView into xls file throught ExportToExcelML. For these puprose I use this code

SaveFileDialog saveDialog = new SaveFileDialog(); 
saveDialog.DefaultExt = "xls"
saveDialog.Filter = "Excel (*.xls)|*.xls"
saveDialog.OverwritePrompt = true
saveDialog.CreatePrompt = true
if (saveDialog.ShowDialog() == DialogResult.OK) 
   if (string.IsNullOrEmpty(saveDialog.FileName)) 
   { 
       MessageBox.Show("Please enter a file name."); 
       return
   } 
                 
   ExportToExcelML export = new ExportToExcelML(); 
   export.HiddenColumnOption = ExportToExcelML.HiddenOption.ExportAsHidden; 
   export.HiddenRowOption = ExportToExcelML.HiddenOption.ExportAsHidden; 
                 
   export.RunExport(bestellungRadGridView, saveDialog.FileName, ExportToExcelML.ExcelMaxRows._65536, true);                 
}    

But on the last line of code (export.RunExport(....)) I get the exception "Worksheet collection cannot be empty." and the inner exception is empty.
Is there some problem in my code or it is some general problem of ExportToExcelML class?

Thank you for your response
Petr
jeff357
Top achievements
Rank 2
 answered on 01 Jul 2011
0 answers
138 views
Hi,

I'm having a little problem, I have a RadGridView where the startup form I do:

ConditionalFormattingObject c2 = new ConditionalFormattingObject("Test_A", ConditionTypes.Equal, "true", String.Empty, true);
            c2.CellForeColor =
            c2.RowForeColor = Color.Blue;
            gdvAuditoria2.Columns[NomesColunasGridAuditoria.Validar].ConditionalFormattingObjectList.Add(c2);
            gdvAuditoria2.Columns[NomesColunasGridAuditoria.Rejeitar].ConditionalFormattingObjectList.Add(c2);
 
            ConditionalFormattingObject c3 = new ConditionalFormattingObject("Test_B", ConditionTypes.Equal, String.Empty, String.Empty, true);
            c3.CellForeColor =
            c3.RowForeColor = Color.Black;
            gdvAuditoria2.Columns[NomesColunasGridAuditoria.CodAuditoria].ConditionalFormattingObjectList.Add(c3);
 
            ConditionalFormattingObject c1 = new ConditionalFormattingObject("Test_C", ConditionTypes.Equal, "true", String.Empty, true);
            c1.CellForeColor =
            c1.RowForeColor = Color.Red;
            gdvAuditoria2.Columns[NomesColunasGridAuditoria.Substituido].ConditionalFormattingObjectList.Add(c1);
More formatting that is being changed only when changing line.
How can I do to change a value after a row with checkbox that formatting is applied?

Marcelo




Marcelo
Top achievements
Rank 1
 asked on 30 Jun 2011
4 answers
243 views
Hello,

I have a form that uses databinding using Dataset/TableAdapter for the Appointments. I have one table - Appointments. If I were to use a button to update the dataset to persist the data, will I still need to hit the "Ok" button before I hit the Update button? I am using the Timeline view and it displays the appointments from table correctly. However, after dragging to new start and end date, I have to select "All day event" then hit Ok and then the update button before my changes are saved.

What am I doing wrong?



Thanks.
FB
Top achievements
Rank 1
 answered on 30 Jun 2011
1 answer
83 views
Hi,
I have a problem when in my application I load a different layout from the default one:
If I have a project opened, his toolwindow is correctly docked under the ribbonbar and also the other toolwindows with the editing tools.
If I load a different layout for the toolwindows with the editing and the main toolwindow with the project is opened, the main toolwindow is automatically hidden.
I tried to force the main toolwindow to stay docked after the layout changes, but the only dock state allowed after the change is a floating toolwindow.
Is there a way to force the main toolwindow to stay docked after the layout change?

Thank you in advance.
Jack
Telerik team
 answered on 30 Jun 2011
6 answers
361 views
Everytime I create a Form with the Telerik RadForm then assign the Desert theme to it, it looks partly loaded only when I launch the application (As per screenshot).
If you look at the borders, they look blacked out.
I use Telerik Winforms 2011.1.11.419
It only seems to happen with Desert theme, and on all forms (even with no code in it).
Ivan Petrov
Telerik team
 answered on 30 Jun 2011
2 answers
204 views
Hi All,

I have a grid, which contains some combobox column.

Is there a way to catch the moment, when the user selected a new item from the dropdown list of a combobox column, but does not leave the column? (e.g.: similar to the SelectedIndexChanged event of the raddropdownlist control).

Best regards,

Peter
Peter Szintai
Top achievements
Rank 1
 answered on 30 Jun 2011
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?