Telerik Forums
UI for WinForms Forum
1 answer
415 views
I need to have a context menu on a gridview whereby the user can select multiple rows on the gridview and right-clicked on it then the user can change the Status of the row via the iCommand.

<telerik:RadGridView Name="rcGridView" Grid.Row="0" Margin="15" ItemsSource="{Binding Users, NotifyOnSourceUpdated=True,  
UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" AutoGenerateColumns="False" ClipToBounds="False"  
SelectionMode="Extended" VerticalAlignment="Stretch"   telerik:StyleManager.Theme="Summer" RowHeight="20"  
RowIndicatorVisibility="Collapsed" CanUserInsertRows="False"  CanUserDeleteRows="False"  HorizontalAlignment="Left"  
FontSize="11"  ClipboardCopyMode="All" ClipboardPasteMode="AllSelectedCells,Default"  SelectionUnit="FullRow" CanUserFreezeColumns="False">     
  <telerik:RadContextMenu.ContextMenu>         
    <telerik:RadContextMenu>             
        <telerik:RadContextMenu.Items>                 
            <telerik:RadMenuItem Header="Approve" Command="{Binding UpdateSourceTrigger=Default, NotifyOnSourceUpdated=True,  
                    RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}},Path=DataContext.StatChgtoApproveCommand}"  
                    CommandParameter="{Binding ElementName=rcGridView, Path=SelectedItems}"  />                 
            <telerik:RadMenuItem Header="Hold" Command="{Binding UpdateSourceTrigger=Default, NotifyOnSourceUpdated=True,  
                    RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}},Path=DataContext.StatChgtoHoldCommand}"
                    CommandParameter="{Binding ElementName=rcGridView, Path=SelectedItems}"  />
            <telerik:RadMenuItem Header="Reject" Command="{Binding UpdateSourceTrigger=Default, NotifyOnSourceUpdated=True,  
                    RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}},Path=DataContext.StatChgtoRejectCommand}"
                    CommandParameter="{Binding ElementName=rcGridView, Path=SelectedItems}" />  
        </
telerik:RadContextMenu.Items>         
    </telerik:RadContextMenu>     
 </telerik:RadContextMenu.ContextMenu>     
 <telerik:RadGridView.Columns
    <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}" />         
    <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" />
    <
telerik:GridViewDataColumn Header="Status" 
DataMemberBinding="{Binding Status}" />     
 </telerik:RadGridView.Columns>
</
telerik:RadGridView>

Unfortunately, when the user click on the item context menu the command will trigger an iCommand and CommanParameter is null. The CommandParameter should be the multiple selected rows on the gridview. Is there a way to make this work?
Vanya Pavlova
Telerik team
 answered on 18 Aug 2011
2 answers
111 views
Hi
we are using 2011 Q2 gridview for winforms. We need to know how can get typed text in a cell inside gridviewcomboboxcolumn. If I try to get text typed when cell value before is something the text i get is always previous text, and if we try to get text typed when dropdown value is nothing always get blank text not typed text.

Thanks in advance.
Jesus
jprian
Top achievements
Rank 1
 answered on 18 Aug 2011
2 answers
279 views
Hello!
I've followed ILMerge Telerik assemblies with the application executable.
Now i have merged application: MergedGeneratorXSD.exe.
When i'm trying to execute it - it cause's runtime error:

EventType: clr20r3  P1:MergedGeneratorXSD.exe P2: 1.0.0.0
P3: 4e495182 P4: mscorlib P5 2.0.0.0 P6 4889dc80 P7:f6
P8: 80 P9: systemtypeloadexception

Sorry for my bad English :)
Martin Vasilev
Telerik team
 answered on 17 Aug 2011
1 answer
116 views
(C#)
When using a GridViewComboBoxColumn is it possible to set the Tag attribute on the cell item who's value comes from the grid combo box.

So I can call:
gridView1.CurrentRow.Cells["ColumnName"].Tag

I understand this would probably have something to do with the GridViewComboBoxColumn DataSource and what it is passed.

For Example
I have two GridViewComboBoxColumns in my GridView, call them "suppliers" and "products".
These items get populated from a database where each has a GUID and a Name.
I would like the Name to show in the grid combobox item for each column and the GUID to be assigned to the grid combo box item tag (or some other place).
When the user changes the "supplier" in any row, I would like to fetch the list of products from the database by searching for the supplier GUID.
Currently it seems all I can get back is the string name. I can see the gridView1.CurrentRow.Cells["ColumnName"].Tag however it is null

Any help would be appreciated, and if you need more info or something to be clearer please ask.

Thanks In advance
Tom.
Stefan
Telerik team
 answered on 17 Aug 2011
2 answers
161 views
Hallo!

Please, help!
How to shift or move existed appointment pragmatically.
Stefan
Telerik team
 answered on 17 Aug 2011
1 answer
141 views
Hello Telerik Members,

I have done "A Lot" of searching the net to figure out the best way to Update my datasource or database without User interaction. I was very surprised when i did not see a "AppointmentCreated" event for RadScheduler .... Not sure why this was never an event.
Anyways, I have spent some time to try to give you guys a little more flexibility in the events that happen at runtime.

Also, was unable to find answers to how to assign each resource a color with a databound Scheduler. I was able to get this working as well. I will provide the code for this while here. Hopefully Telerik admins will see this and make it in the code library or sticky this thread ?

Anyways, here you go:

Custom Event Handling:
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports Telerik.WinControls.UI
Imports Telerik.WinControls.Data

' EVENT HANDLER FOR APPOINTMENTS COLLECTION CHANGED CALLS FUNCTION
' Appointments_CollectionChanged()
' CAN ADD THIS TO THE FORM_LOAD EVENT
AddHandler RadScheduler1.Appointments.CollectionChanged,
AddressOf
Appointments_CollectionChanged
 
'Appointments_CollectionChanged()
Private Function Appointments_CollectionChanged(ByVal sender As Object,
ByVal e As NotifyCollectionChangedEventArgs) As String
' WILL PASS A ACTION TO CollectionChangedCompleted()
' DEPENDING ON THE ACTION PERFORMED AT RUNTIME
        Select Case e.Action
            Case NotifyCollectionChangedAction.Add
                CollectionChangedCompleted("Add")
            Case NotifyCollectionChangedAction.Batch
                CollectionChangedCompleted("Batch")
            Case NotifyCollectionChangedAction.ItemChanged
                CollectionChangedCompleted("ItemChanged")
            Case NotifyCollectionChangedAction.ItemChanging
                CollectionChangedCompleted("ItemChanging")
            Case NotifyCollectionChangedAction.Move
                CollectionChangedCompleted("Move")
            Case NotifyCollectionChangedAction.Remove
                CollectionChangedCompleted("Remove")
            Case NotifyCollectionChangedAction.Replace
                CollectionChangedCompleted("Replace")
            Case NotifyCollectionChangedAction.Reset
                CollectionChangedCompleted("Reset")
        End Select
 
        Return String.Empty
End Function
 
' CollectionChangedCompleted()
' THIS FUNCTION CHECKS TO MAKE SURE THE RadScheduler APPOINTMENTS
' WHERE UPDATED
Private Function CollectionChangedCompleted(ByVal action As String) As Boolean
        If RadScheduler1.Appointments.IsUpdated Then
            ' FORWARD THE ACTION TO performAction()
                 ' FOR PROCESSING CUSTOM OPERATIONS
            performAction(action)
            Return True
        Else
            Return False
        End If
 
        Return False
End Function
 
' performAction()
Private Function performAction(ByVal action As String) As Boolean
        Select Case action
            Case "Add"
                'DO CUSTOM OPERATIONS
                ' ie: updating your datasource/database
                ' WITH OUT THE NEED FOR A "SAVE/UPDATE" BUTTON
                ' AUTOMATED UPDATING :)
 
            Case "Batch"
                'DO CUSTOM OPERATIONS
 
            Case "ItemChanged"
                'DO CUSTOM OPERATIONS
 
            Case "ItemChanging"
                'DO CUSTOM OPERATIONS
 
            Case "Move"
                'DO CUSTOM OPERATIONS
 
            Case "Remove"
                'DO CUSTOM OPERATIONS
 
            Case "Replace"
                'DO CUSTOM OPERATIONS
 
            Case "Reset"
                'DO CUSTOM OPERATIONS
 
        End Select
End Function


And the Resources Color Code:
' CALL TO APPLY COLORS TO RESOURCES!!!!
Private Sub applyResourceColors()
        Dim colors() As Color = {Color.LightPink, Color.LightBlue, Color.LightCyan, Color.LightGreen, Color.LightSalmon, Color.LightYellow, Color.LightCoral}
        Dim i As Integer = 0
 
        For Each res As Resource In RadScheduler1.Resources
            res.Color = colors(i)
 
            ' TO MAKE SURE WE DON'T GO OUT OF RANGE FOR THE COLORS() ARRAY
            ' IF WE REACH OUR ZERO BASED INDEX COUNT ON COLORS ARRAY WE RESET i TO 0
            ' ALLOWING IT TO REPEAT THE COLORS
            Dim colorsCount As Integer = colors.Count
 
            If Not i = colorsCount Then
                i += 1
            Else
                i = 0
            End If
 
        Next
End Sub
[UPDATE] - I have noticed that for whatever reason that resource colors get reset after data updating ... not sure why yet but I have contacted Rob Shoemate on his blog about resource grouping to try and see if there is a better way of doing this! If I get any updates i will edit this post so that all can learn from it!

You can follow this blog for responses from Rob here

Hope this helps some of you!

Will continue to contribute when possible!

Thanks,
Mike
Martin Vasilev
Telerik team
 answered on 17 Aug 2011
1 answer
97 views
Hello,

I'm using a DataTable to display data in a GridView.  The DataTable is programatically maintained and contains entries in various RowStates including deleted.

Currently, the GridView is display the deleted entries, which I would like to hide but I need them to stay in the DataTable so I can send all the changes to the database once the user accepts the data.

I am using version 2010.3.10.1215 of RadControld for WinForms.


=======================================================
 Update:
=======================================================
Was a programming bug on my part.  I was bound to the wrong data source.
Stefan
Telerik team
 answered on 17 Aug 2011
1 answer
186 views
Has anybody an idea, how to paint image overlays over the listitems? One solution could be to create the item image dynamically, but I am looking for a better solution (less resource usage and faster processing). The grid view has the rowpaint event, but I don't find such a event for the list view.

Jack
Telerik team
 answered on 17 Aug 2011
0 answers
94 views
Hello,

I use RadDropDownList.
I want to change the color of the selected text, the text which is shown when the drop-down pop-up is closed
I dont need to change any of the items on the drop-down list, just the selected one
How do I do it?

Thanks.
Arnon
Top achievements
Rank 1
 asked on 17 Aug 2011
1 answer
107 views
Hi
I am trying to find documentation about how to work with RadRibbonBar Help button.
We are using version 2011.2.11.712.
Does anyone have a link or document how to work with this?
Stefan
Telerik team
 answered on 16 Aug 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?