Telerik Forums
UI for WinForms Forum
1 answer
199 views

I've been playing around with SaveLayout and gotten it to work with the standard SaveLayout.

But I'm looking for a way to save ONLY the layout information (column width, column order,visible columns, etc).

I can't seem to find a way to do it.

 

This is what I've tried so far:

RadGridView1.XmlSerializationInfo.SerializationMetadata.Clear()
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(RadGridView), "MasterTemplate", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(GridViewTemplate), "FilterDescriptors", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(CompositeFilterDescriptor), "FilterDescriptors", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(CompositeFilterDescriptor), "LogicalOperator", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "PropertyName", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "Operator", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "Value", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "IsFilterEditor", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(GridViewTemplate), "Columns", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(GridViewDataColumn), "Name", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(GridViewDataColumn), "Width", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
 
 
RadGridView1.SaveLayout(mStream)

 

It gives me a blank result.

THIS works for filtering but not any of the column info (width, order, visible):

RadGridView1.XmlSerializationInfo.DisregardOriginalSerializationVisibility = True
RadGridView1.XmlSerializationInfo.SerializationMetadata.Clear()
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(RadGridView), "MasterTemplate", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(GridViewTemplate), "FilterDescriptors", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(CompositeFilterDescriptor), "FilterDescriptors", ComponentModel.DesignerSerializationVisibilityAttribute.Content)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(CompositeFilterDescriptor), "LogicalOperator", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "PropertyName", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "Operator", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "Value", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
RadGridView1.XmlSerializationInfo.SerializationMetadata.Add(GetType(FilterDescriptor), "IsFilterEditor", ComponentModel.DesignerSerializationVisibilityAttribute.Visible)
 
 
 
RadGridView1.SaveLayout(mStream)

 

What am I missing?

Dimitar
Telerik team
 answered on 11 Jun 2019
7 answers
178 views

Hi

 

How to I hide / minimise the size of a CommandBar that is empty? (See attached image)

Also, there is a small border around the edge of the area (like a Margin or Padding) that I cant reduce. Is there a way to make the CommandBar be positioned tight to the edge?

I hope this makes sense.

Regards

Duane Suter

Dimitar
Telerik team
 answered on 10 Jun 2019
15 answers
296 views

I have a Terlik Radgridview with GridViewComboBoxColumn and GridViewTextBoxColumns,In that I want to raise a event while typing on GridViewTextBoxColumn
Dimitar
Telerik team
 answered on 07 Jun 2019
1 answer
105 views

Hello,

How can i get position of a message in the whole conversation of chat UI. So that i will be able to auto scroll the chat to that location. So that the particular msg can be highlighted.

Thanks.

Dimitar
Telerik team
 answered on 07 Jun 2019
1 answer
298 views

Hi,

Myself Niharika 

I wanted to know how to test .Net winform applications using Telerik Test studio

Do i need to install any testing framework 

Can you please update any demo for the same

Thank you 

Niharika

Plamen Mitrev
Telerik team
 answered on 07 Jun 2019
0 answers
113 views

Greetings,

For resizing form's controls, I use this

However, I want to resize the width of  RadRibbonBarGroups, so that there is no empty space (gap) left between elements of the RibbonBarTab. (All  RadRibbonBarGroups should fill up the available space in RibbonBarTab , according to RibbonBarTab's width (form's width))

I would appreciate any help

Thanks

George C.
Top achievements
Rank 2
Iron
Veteran
 asked on 05 Jun 2019
5 answers
128 views
Is is possible to set the contents of the page title?
Dimitar
Telerik team
 answered on 05 Jun 2019
2 answers
94 views

Evening all,

I have a button on the startmenu that calls up a Feedback form for the users to fill in.

No problems getting the form to appear.

My issue is the Startmenu dos not disappear, so it appears on top of the new form till you click on it.

I tried setting focus on the new form but that did nothing.

Is there some sort of Startmenu.visibility.hide I could call after clicking the menu button that calls up the 2nd form?

Or is this a bug! :(

See attached image of the issue.

 

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 05 Jun 2019
13 answers
2.0K+ views

Hi folks - I know this same question has been asked several times and each time was extremely helpful except every solution I've seen so far ONLY deals with the "Textbox" region of a RadDropDownList.

 

What I want to do is change the Border Color (if there is one) AND the background color (Fillcolor?) of JUST the dropdown. 

You can see my "FromThis.png" and "ToThis.png" attachments to see far more clearly what I'm talking about.

 

Thanks again in advance everyone!

-Curtis

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 04 Jun 2019
0 answers
174 views

Hello,

I contact you because I have 2 questions about the events of RagGridView control.

  1. I have 2 columns in my GridView (one GridViewTextBoxColumn readonly and one GridViewDecimalColumn editable). The decimal column can have a null value or a decimal value.
    I handle these events : CellValidating, RowValidating and RowValidated. In the CellValidating, I check if my decimal column has a value and in this case it must be between min and max value and display the Row.ErrorText and cancelling the validating event. However if the decimal value is null, I have to ask the user a confirmation when the row is validating, so I do that in the RowValidating event. If the user does not confirm, I cancel the RowValidating and I would like to set the decimal cell as the current cell and BeginEdit. Is it possible in the RowValidating event set a current cell and BeginEdit (in a new row or an existing row) ?
  2. In the GridView I register a custom GridNewRowBehavior and override the ProcessEscapeKey method that execute this code :
    bool canceled = this.GridViewElement.CancelEdit();
    this.GridControl.MasterView.TableAddNewRow.CancelAddNewRow();

    return canceled;       
    If the gridView is in edit mode on the new row or an existing row and I press the Escape key, my custom behaviour performs perfectly this treatment. But the RowValidating and RowValidated events in my form fires. How can I detect in these events that the edit mode is canceling because I would like to reset some properties ?

Thank you
Fabrizio

Fabrizio
Top achievements
Rank 1
 asked on 04 Jun 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)
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
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?