Telerik Forums
UI for WinForms Forum
1 answer
298 views
Hello

I have a class that holds two other classes Like this
public Class A
{
   Some properties From A
   some methods From A
}
 
public Class B
{
    some properties from B
    Some methods from A
}
 
public Class C
{
   public  Aclass a;
   public  Bclass b;
}
However I need to list a collection of Class c in a list where some columns shouldn't show, some should be readable only, some should have another Columnheader name than class property name. I figure I need to make a template class where I extend a gridview template class, however I am unable to find a tutorial on how to make such a template class

Any Information on this is appreciated.

----
Expected result
I am not exactly looking to change backgroundcolor or play music, but these are some of the things that are possible with a template
public Class Gridview
{
private void someMethod()
{
   gridview.Template=new Templ;
}
private
class templ : Template
{
put this information from these classes into those columns
make some columns do this
make each four row have a button that play a song
make the background appear as something specific depending on teh information it has
}
}

Julian Benkov
Telerik team
 answered on 06 Sep 2012
13 answers
533 views
Hi All!

I have a grid, with some DateTime column, but I would like to change the original DateTime picker to Time picker, because in some cases the date part is disinterested, and the user wants to set specific time moments in a user friendly way.

It is possible to do this?

Best regards,
Peter
Stefan
Telerik team
 answered on 06 Sep 2012
5 answers
1.4K+ views

Hello,

I've created a RadContextMenu and wanted to add a few check boxes for user to check and un-check when right click.  I see that the RadContextMenu can add combo box, but what about checkbox?  After a check box is check. I want it to stay check until the user right click and un-check it. Is this possible?

Thanks in advance for the help.

Themos
Top achievements
Rank 1
 answered on 06 Sep 2012
0 answers
143 views
I am trying to set an entire WinForms app with Desert theme
I have a group of buttons in a user control which is used in two different forms
both forms are RadForms and both are set to Desert as part of the constructor
Public Sub New()
    ' This call is required by the designer.
    InitializeComponent()
    Dim myTheme As New DesertTheme()
    ThemeResolutionService.ApplicationThemeName = "Desert"
End Sub

one form has ochre buttons with that gradient I like - and the other form has that ugly grey which is Microsoft control
why is this?

I figured out why - after leaving a dent in my desk after trying EVERYTHING I could think of
the user control starts out not Enabled - when it is Enabled it gets the nice gradient
Elliott
Top achievements
Rank 2
 asked on 05 Sep 2012
2 answers
208 views
Hi,

can anyone convert this code to vb.net, please?

radscheduler1.AppointmentEditDialogShowing += new EventHandler<Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs>(radscheduler1_AppointmentEditDialogShowing);


The Telerik converter generates this, but it doesn't work.

radscheduler1.AppointmentEditDialogShowing += New EventHandler(Of Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs)(radscheduler1_AppointmentEditDialogShowing)



Thanks + greeting

Daniel
Daniel
Top achievements
Rank 1
 answered on 05 Sep 2012
4 answers
341 views

I created a support ticket and asked the following question:

I am binding a RadGridView to a SQL Server table.
The code below returns the following Data Exception Error:
Cannot set column 'SSAN'. The value violates the MaxLength limit of this column.

The SSAN field is a varchar(9). It should store 111223333 and not 111-22-3333. How can I set the column to save the text without the literals?

 

Dim col As GridViewMaskBoxColumn = New GridViewMaskBoxColumn
With col
.Name = "SSAN2"
.FieldName = "SSAN"
.HeaderText = "SSN"
.MaskType = MaskType.Standard
.Mask = "000-00-0000"
.TextAlignment = ContentAlignment.MiddleCenter
.DataType = GetType(String)
'.FormatString = "{0:000-00-0000}"
End With
RadGridView1.MasterTemplate.Columns.Add(col)


Svett from Telerik answered with the following:

You can achieve that by creating a custom editor:
Public Class CustomMaskedEditor
Inherits RadMaskedEditBoxEditor
Public Overrides Property Value() As Object
Get
Dim value__1 As Object = MyBase.Value
value__1 = Convert.ToString(value__1).Replace("-", String.Empty)
Return value__1
End Get
Set
MyBase.Value = value__1
End Set
End Property
End Class

Then you should use the EditorRequired event of RadGridView to replace the default one:
Private Sub radGridView1_EditorRequired(sender As Object, e As EditorRequiredEventArgs)
If e.EditorType = GetType(RadMaskedEditBoxEditor) Then
e.EditorType = GetType(CustomMaskedEditor)
End If
End Sub



I did not realize that my ticked had been closed because of my delayed response and I asked  Svett if the following would not also be a solution:
Imports Telerik.WinControls.UI
Public Class CustomMaskedEditor
Inherits RadMaskedEditBoxEditor
Public Overrides Sub BeginEdit()
MyBase.MaskTextBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals
MyBase.BeginEdit()
Me.EditorElement.Focus()
End Sub
End Class

Can anyone tell me if this is not an acceptable way to only have the numbers saved to the database? 
Peter
Telerik team
 answered on 05 Sep 2012
4 answers
277 views

Upgraded to Version 2012.2.726.40 today and have been struggling to get my project working again. 

One thing I noticed right away is that my command buttonelements in my grid no longer display their images.

here's how I am adding them in code:

private void radGridViewJobs_CellFormatting(object sender, CellFormattingEventArgs e)
{
    try
    {
        foreach (RadElement ele in e.CellElement.Children)
        {
            if (ele is RadProgressBarElement)
            {
                e.CellElement.Children.Remove(ele);
                break;
            }
 
        }
 
        if (e.CellElement is GridCommandCellElement && !(e.CellElement.RowElement is GridTableHeaderRowElement))
        {
 
            GridViewCommandColumn column = (GridViewCommandColumn)e.CellElement.ColumnInfo;
            String colname = column.FieldName.ToLower();
            if (colname == "stationview")
            {
                RadButtonElement element = (RadButtonElement)e.CellElement.Children[0];
                element.Image = global::PayerConnectClient.Properties.Resources.workstation;
                element.DisplayStyle = DisplayStyle.Image;
                element.ImageAlignment = ContentAlignment.MiddleCenter;
                 
 
                String myStation = e.CellElement.RowInfo.Cells["workstation"].Value.ToString().Trim();
 
                if (myStation.Length > 0)
                {
                    element.ToolTipText = @"View/Modify " + myStation + " Profile and Current Configuration";
                    element.Enabled = true;
                    element.DisplayStyle = DisplayStyle.Image;
                    element.ShowBorder = true;
                }
                else
                {
                    element.Enabled = false;
                    element.DisplayStyle = DisplayStyle.None;
                    element.ShowBorder = false;
                }
                if (element.ElementState == ElementState.Constructed)
                    element.Click += new EventHandler(Workstation_Click);
 
            }
         }
     }
    catch (Exception ex)
    {
        RadMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, RadMessageIcon.Error);
    }
}

Other than the Telerik update - nothing else has changed.

Any help you could provide would be greatly appreciated.  This is extremely urgent as I will be demoing this product early next week.

thanks!


Note:  I am using 4 different themes: Office2010Blue, Black and Silver and Windows7.  All themes show same behavior.

Stefan
Telerik team
 answered on 05 Sep 2012
3 answers
459 views
So here is our scenario:

We have a main executable (app) with docking enabled.  A Left Panel and a Right panel.  Each of them can be undocked and pulled out of the application.

The left panel is a no brainer it contains windows controls, etc. 

The right panel has a few windows controls, and a user control that we created and also has docking enabled?

So there are a couple questions:

1. Is this scenario able to be accomplished? 
2. Can we build a user control that contains docking?
3. If the user control, has a docked panel(s), can we pull those out not only from the user control but also from the main application?

I hope that makes sense.  Thank you in advance for any tips, gotchas, etc. 


Nikolay
Telerik team
 answered on 05 Sep 2012
1 answer
245 views

Hello,

I have downloaded the below reffered test application and try to run in the latest Telerik version release(Q2 2012 SP1), I am finding attached error messages which I can't debug it. I tried lot to adding all refernces and didn't found the required reference dll. RadControlDesignTimeData and
ControlStyleBuilderInfoList.

Please make it ruinable below attached application ASAP otherwise give new collapsible panel test application whic works in Telerik version (Q2 2012 SP1) (C# code required)

Thanks in advance.

Ref:http://www.telerik.com/community/forums/winforms/panels-and-labels/collapsible-panels.aspx

Regards
Manoj

 

Nikolay
Telerik team
 answered on 04 Sep 2012
3 answers
398 views
Please help me for setting the theme for grid view.

Thanks for support.
Stefan
Telerik team
 answered on 04 Sep 2012
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?