Telerik Forums
UI for WinForms Forum
3 answers
319 views
Hello

I have a GridViewCheckBoxColumn column added to a GridView that serves as a visual flag about the row's update status. I want to validate and update that checkbox' ToggleState while I am in the CellEndEdit of another column (that have a Spinner editor).

This gives me a Null value on the left side. (as well as many variants thereof)

if ((ToggleState)e.Row.Cells["RegleActive"].Value == ToggleState.On)

Thanks
Stefan
Telerik team
 answered on 02 Nov 2012
3 answers
375 views
Hi, I'm trying to build a custom theme to use over all my application.
I stardet from an existing theme, as suggested, and I've build my custom them as a tssp file.

I added the tssp to my project and I setted it as application theme:

ThemeResolutionService.LoadPackageResource("MyProject.MyCustomTheme.tssp")
ThemeResolutionService.ApplicationThemeName = "MyCustomTheme"

When I build and I run the application, all the forms and controls appears with my custom theme, and this is very good.
But at design time, using the visual studio form editor I don't see my theme.
How can I see my theme even in design time?

Do I have to load the same theme using a RadThemeManager (from the xml equivalent files) and set the ThemeName property for all controls?
If yes, which is the utility of using the ApplicationThemeName property?

Thank you.
Stefan
Telerik team
 answered on 02 Nov 2012
1 answer
108 views
   I have made my custom ribbon bar like this:
  
public class TMRibbonBar:RadRibbonBar
{
}

in similar fashion, I have made my custom buttons ie.RadButtonElement, RadCheckBoxElement.
What I want is how can I add a button of my own in the "Add an Item" option of "Right Click - Context Menu" of "RadRibbonBarGroup". I mean, my custom button should appear in the list to be selected.

I can add my custom button in the RadRibbonBarGroup dynamically, but how can I do it through the UI?
I hope am not raising a totally invalid requirement.
Stefan
Telerik team
 answered on 02 Nov 2012
3 answers
151 views
Win 7 - 64bit,
Telerik WinForms Controls 2012.2.912.40
Using VB.net

Hello:

I placed a RadContextMenu on a Form
I then attempted to associate the RCM to a RadGridView in the ContextMenuOpening Event...

 

 


Private
Sub RGV_ContextMenuOpening(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.ContextMenuOpeningEventArgs)

 

    e.ContextMenu =

 

Me.RadContextMenuForGrids

 

End

 

 

Sub

 

Why is the compiler seeing the 2 objects as being different.  Here is the error?

RadContextMenu cannot be converted to RadDropDownMenu?

Thanks,
Mark

Stefan
Telerik team
 answered on 02 Nov 2012
1 answer
84 views
Helo,

I have severals radgrid superposed (like picture ) and 
I want to remove border of cell (highlited) in a radgrid if the cell is not selected  to keep only one cell highlited (selected cell)
I use a CellSelect mode

I tried this code but the result is ugly, Because of original cell border (blue) is deleted Also

RadGridView_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
     GridDataCellElement dataCell = e.CellElement as GridDataCellElement;
      if (dataCell != null)
      {
          Color borderColor = Color.Transparent;
        if (!dataCell.IsSelected)
          borderColor = Color.Red;
         
         dataCell.BorderColor = borderColor;
      }
        
  }

Thank you for your help,
Ivan Petrov
Telerik team
 answered on 02 Nov 2012
1 answer
117 views
Hi I need to call the SelectedIndex event after loading the form.
The reason for this is that the dropdownlist determines if other controls are displayed on the form

here is a example of the idea
Partial Class Example
     Public Function LoadData() As Boolean
      
       Me.DropDownList1.DataSource = Types.ConfirmationType
 
        If Not CustomerName Is Nothing Then
 
            ' Where the DropDownlist ID is DropDownList1
            Me.DropDownList1.SelectedText = "Driver"
             
            ' Calls the method directly passing the appropriate sender
            Me.DropDownList1_SelectedIndexChanged(Me.DropDownList1, Nothing)
        End If
     End Function
 
    Protected Sub DropDownList1_SelectedIndexChanged(sender As System.Object, e As Telerik.WinControls.UI.Data.PositionChangedEventArgs) Handles DropDownList1.SelectedIndexChanged
          
        Dim options As String = Me.DropDownList1.SelectedText
 
        Select Case options
            Case "Driver"
                'Display the Driver mobile fields
                Me.lblDriverMobile.Visible = True
                Me.txtDriverMobile.Visible = True
                Me.ddlDriverMobileCode.Visible = True
                Me.pbDriverMobile.Visible = True
            Case Else
                'Hide the Driver mobile fields
                Me.lblDriverMobile.Visible = False
                Me.txtDriverMobile.Visible = False
                Me.ddlDriverMobileCode.Visible = False
                Me.pbDriverMobile.Visible = False
 
        End Select
     End Sub
End Class

The issue is that the call does not happen and the line 

Me.DropDownList1_SelectedIndexChanged(Me.DropDownList1, Nothing)

Does not seem to work ?
What I get in the options value is a empty string ?

Any ideas
Peter
Telerik team
 answered on 02 Nov 2012
1 answer
121 views
I have the following RowSourceNeeded handler :

void gvEmployes_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e)
{
    if (e.Template == gvtEmployeLogiciels)
    {
        using ( var repo = new EmployesRepository())
        {
            foreach (LogicielDTO l in repo.GetLogicielsOfEmploye((EmployeDTO)e.ParentRow.DataBoundItem))
            {
                GridViewRowInfo gridRow = e.Template.Rows.NewRow();
                gridRow.Cells["nom"].Value = l.nom;
                gridRow.Cells["nbLicense"].Value = l.nbLicense;
                e.SourceCollection.Add(gridRow);
            }
        }
    }
}

However, I want the objects to be bound instead of just filling in cells so that something like this would work :

void gvEmployes_UserDeletingRow(object sender, GridViewRowCancelEventArgs e)
{
    foreach (var row in e.Rows)
    {
        switch (row.DataBoundItem.GetType().Name) // This will error if you are deleting a LogicielDTO row.
        {
            case "EmployeDTO":
                MessageBox.Show("Deleteing " + ((EmployeDTO)row.DataBoundItem).nom);
                break;
            case "LogicielDTO":
                MessageBox.Show("Deleteing " + ((LogicielDTO)row.DataBoundItem).nom);
                break;
        }
    }
}

How can I acheive this?
Julian Benkov
Telerik team
 answered on 02 Nov 2012
1 answer
86 views
Hi,

I want to add 8 radio buttons , in tabular fashion in radribbon bar(Please check in attached image).
I have added a  RadRibbonbarGroup=>2 horizontal RadRibbonbarButtons(with vertical orientation).

As these buttons are placed in two separate ribbonBarbuttons,therefore I can select two radio buttons simultaneously , one from each ribbonbarButton.

Please let me know how to keep the group of radiobuttons same, although are placed in different radribbonbarButton group.

Thanks in Advance!
Anjali
Anton
Telerik team
 answered on 02 Nov 2012
1 answer
82 views
Upgraded to the latest version of telerik.  From v.2012.1.301 to v2012.3.1017.  We now get the following exception when UI adds a UserControl, which has a RadTreeView to a RadPageViewTabPage:



ExceptionMessageBoxShown@Value of '-2147483648' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
Parameter name: LargeChange
System.ArgumentOutOfRangeException: Value of '-2147483648' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
Parameter name: LargeChange
   at Telerik.WinControls.UI.RadScrollBarElement.set_LargeChange(Int32 value)
   at Telerik.WinControls.UI.RadTreeViewElement.UpdateOnMeasure(SizeF availableSize)
   at Telerik.WinControls.UI.VirtualizedScrollPanel`2.MeasureOverride(SizeF availableSize)
   at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.RootRadElement.MeasureOverride(SizeF availableSize)
   at Telerik.WinControls.RootRadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.RadElementTree.PerformInnerLayout(Boolean performMeasure, Int32 x, Int32 y, Int32 width, Int32 height)
   at Telerik.WinControls.RadControl.OnLoad(Size desiredSize)
   at Telerik.WinControls.UI.RadTreeView.OnLoad(Size desiredSize)
   at Telerik.WinControls.RadControl.LoadElementTree(Size desiredSize)
   at Telerik.WinControls.RadControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.set_Visible(Boolean value)
   at Telerik.WinControls.UI.RadPageViewPage.set_Visible(Boolean value)
   at Telerik.WinControls.UI.RadPageViewElement.SetSelectedContent(RadPageViewItem item)
   at Telerik.WinControls.UI.RadPageViewElement.SetSelectedItem(RadPageViewItem item)
   at Telerik.WinControls.UI.RadPageViewStripElement.SetSelectedItem(RadPageViewItem item)
   at Telerik.WinControls.UI.RadPageViewElement.OnSelectedPageChanged(RadPageViewEventArgs e)
   at Telerik.WinControls.UI.RadPageView.SetSelectedPage(RadPageViewEventArgs e)
   at Telerik.WinControls.UI.RadPageView.set_SelectedPage(RadPageViewPage value)
   at MainApp.MainShell.Display(IContent aContent) in C:\svn\dev\source\ui\MainApp\MainShell\MainShell.cs:line 1832
Peter
Telerik team
 answered on 01 Nov 2012
1 answer
70 views
I feel like this is something obvious that I am overlooking.  I want to insert a bulleted list into a richtextbox at design time.  I use the MarkupEditor to get the list in and it displays the text with the proper formatting in the Text property but nothing shows up in the richtextbox itself.  The help document states that design time text can be inserted and made read only.  What am I missing here?
Julian Benkov
Telerik team
 answered on 01 Nov 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)
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
CheckedDropDownList
ProgressBar
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
NavigationView
VirtualKeyboard
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?