Telerik Forums
UI for WinForms Forum
4 answers
562 views
Hi Support,

I have a grid in which I've implemented a custom multi select combo box column which inherits from GridViewComboBoxColumn. The row data for the grid is a business object which contains a list of values which are then mapped as individual column in the grid (satisfying the customer need to be able to create their own fields). The underlying data for my ComboBoxColumn is a list of values. I've implemented a multi-select dropdown which allows the user to select multiple values via checkboxes. The Value property is overridden to show the values in the list as a simple string. The image below shows this:


What I now want to be able do is to filter on the values. "Show me the rows there 'WILSON' appears". Sounds too easy...

The filter options available are No Filter, Null, Not Null and Custom. When I bash together a test project with a ComboBoxColumn I get the full suite of filters. What happened to them for my custom column?

If there was the 'Contains' filter option that I hoped for I'm not sure that it will work properly anyway. The underlying data is a list, not a  single value, so I'm not sure how the filtering would be applied.

I tried using the Excel filtering type (by implementing IGridFilterPopup) but I encountered some errors relating to comparing elements in the list.

I was hoping for some advice/tips on the best way to implement this kind of filter?

Thanks,
Dave
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Sep 2016
1 answer
149 views

Hi,

 

I have a gridview, one of the columns is time in minutes. I've summed this in the SummaryRow, but would also like to convert it to hours and minutes.

I know how to convert it (as in, I know what I need to do to minutes to get hours) and have this that gives me the total of minutes:

        Me.RadGridView1.MasterTemplate.ShowTotals = True
        Dim summaryItem As New GridViewSummaryItem("actual_time", "Total Minutes = {0}", GridAggregateFunction.Sum)
        Dim summaryRowItem As New GridViewSummaryRowItem()

        summaryRowItem.Add(summaryItem)
        Me.RadGridView1.SummaryRowsTop.Add(summaryRowItem)

Is it possible for me to get the value of so I can then manipulate it before passing it back to the SummaryItem?

Thanks, Shane

Dimitar
Telerik team
 answered on 08 Sep 2016
5 answers
191 views

Hi,

I've got a gridview which contains a ListView of GridLayouts. In essence the items are made of SimpleListViewVisualItems very similar to the ListView example found in the demo applications for winforms. Instead of using a StackLayoutPanel for presentation, all data is filled into a GridLayout for easier maintenance and readability. How should I proceed to implement export and print functionality?

I thought of exporting row data to images and exporting those images similar to how it is done in a GridView of ChartElements, but GetAsBitmap returns nothing. Here is the relevant code:

Dim width = column.Width
Dim height = grid.TableElement.ChildRowHeight - 40
 
Dim radListElement = New RadListViewElement()
Dim gridLayout As GridLayout
Dim gridLayoutElements = New List(Of RadTextBoxElement)
 
gridLayout = New GridLayout()
gridLayout.StretchHorizontally = False
gridLayout.StretchVertically = False
gridLayout.Columns.Clear()
gridLayout.Rows.Clear()
 
Dim myFixedWidth = 300
Dim myFixedHeight = 40
 
gridLayout.Columns.Add(New GridLayoutColumn() With {.SizingType = GridLayoutSizingType.Fixed, .FixedWidth = myFixedWidth})
gridLayout.Columns.Add(New GridLayoutColumn() With {.SizingType = GridLayoutSizingType.Fixed, .FixedWidth = myFixedWidth})
gridLayout.Columns.Add(New GridLayoutColumn() With {.SizingType = GridLayoutSizingType.Fixed, .FixedWidth = myFixedWidth})
gridLayout.Columns.Add(New GridLayoutColumn() With {.SizingType = GridLayoutSizingType.Fixed, .FixedWidth = myFixedWidth})
 
gridLayout.Rows.Add(New GridLayoutRow() With {.SizingType = GridLayoutSizingType.Fixed, .FixedHeight = myFixedHeight})
gridLayout.Rows.Add(New GridLayoutRow() With {.SizingType = GridLayoutSizingType.Fixed, .FixedHeight = myFixedHeight})
gridLayout.Rows.Add(New GridLayoutRow() With {.SizingType = GridLayoutSizingType.Fixed, .FixedHeight = myFixedHeight})
gridLayout.Rows.Add(New GridLayoutRow() With {.SizingType = GridLayoutSizingType.Fixed, .FixedHeight = myFixedHeight})
gridLayout.Rows.Add(New GridLayoutRow() With {.SizingType = GridLayoutSizingType.Fixed, .FixedHeight = myFixedHeight})
gridLayout.Rows.Add(New GridLayoutRow() With {.SizingType = GridLayoutSizingType.Fixed, .FixedHeight = myFixedHeight})
 
For x As Integer = 0 To gridLayout.Rows.Count * gridLayout.Columns.Count - 1
    Dim child As RadTextBoxElement = CType(GetTextBoxElement(x), RadTextBoxElement)
    child.SetValue(GridLayout.RowIndexProperty, x Mod gridLayout.Rows.Count))
    child.SetValue(GridLayout.ColumnIndexProperty, CInt(Fix(x / gridLayout.Rows.Count)))
    gridLayout.Children.Add(child)
    gridLayoutElements.Add(child)
Next
 
radListElement.Children.Add(gridLayout)
 
Application.DoEvents()
 
radListElement.InvalidateMeasure(True)
radListElement.UpdateLayout()
 
Dim image = radListElement.GetAsBitmapEx(Color.White, 1, New SizeF(width, height))
 
Dim imageTemp = New RadImageItem()
imageTemp.Image = image
imageTemp.Image.Save(".\test" + i.ToString() + ".png")
 
row.Cells("someColumn").Tag = imageTemp.Image
i += 1

 

Private Function GetTextBoxElement(count As Integer) As RadElement
        Dim result As New RadTextBoxElement()
        Dim myText As String = ""
        result.Text = myText
        result.StretchHorizontally = True
        result.StretchVertically = True
        Return result
    End Function

I am sure I am missing something, but unsure of what it might be.

Looking forward to your respons

Dimitar
Telerik team
 answered on 08 Sep 2016
1 answer
89 views

hi

I create a custom column as in documentation described, and can add it by code to grid view.

i want see my custom column in designer. i mean i want when i click to add to add column in property builder or in columns dialog, my custom column be there and can add it as predefined column to my columns in properrty builder or in columns dialog.

is there a way to do that?

thanks in advanced

Dimitar
Telerik team
 answered on 07 Sep 2016
1 answer
460 views

Hello all,

how can I locate a certain row (or determine a row index) in the virtual grid by looking up a certain value?

If for example I have a list of employees with ID, Name, Address, Phone how can I locate the row with a certain Employee ID?
Also there seems to be no row collection that can be searched using Linq.

Thanks in advance.

Best regards, Ronny

Hristo
Telerik team
 answered on 07 Sep 2016
6 answers
329 views
Hi,

I'm using the RadRibbon Form and i have set ApplicationMenuStyle to BackstageView I have added a ListBox on a Tab and when I double click an item in it I want to load a file and show the main form.

I can load the file fine but the BackstageView does not close. How do i get the BackstageView to close?

thanks
Christ
Top achievements
Rank 2
 answered on 07 Sep 2016
2 answers
202 views

I have created a custom theme that is a copy of a standard theme (I exported a .tssp file, made a copy, and started editing the copy). I would like to copy some individual elements from a different them to my custom theme (for example, the RadForm along with it's titlebar icons). So far I haven't been successful in figuring out how to do this. Is it possible? If so, could you list the steps necessary to do it? (I would prefer to keep everything contained in one custom .tssp file if possible.)

Thanks.

Craig

Craig
Top achievements
Rank 2
 answered on 06 Sep 2016
3 answers
425 views

Hi,

I can't seem to figure out the right control to use for my task.  I tried RadMaskedEditBox with all type of masking type and RadSpinEditor, but neither can get me what I need.  Here is what I need:

1. This control must allow to enter only numeric values.

2. This control has to be binded to a nullable integer. 

3. This control need to allow me to delete the value leaving it blank, which should assign null to the binded property.  Vice versa, if I set value of the binded property to null, then control should not contain any values.

Any suggestions?

Thank you in advance.

 

Dimitar
Telerik team
 answered on 06 Sep 2016
3 answers
616 views
I'd like to remove all columns from my grid at run-time and completely rebuild it. I can't do:

            foreach (var column in GridQueue.Columns)
            {
                GridQueue.MasterGridViewTemplate.Columns.Remove(column);
            }

because the Remove changes the iteration and it throws "Collection was modified; enumeration operation may not execute."

Suggestions? thanks.

-John
 


Dimitar
Telerik team
 answered on 06 Sep 2016
1 answer
119 views

I have a situation where I have a bunch of Rad Controls (RadTextbox, RadSpinEditor, RadDropDownList) on a User Control. That User Control is then injected into a custom Windows MMC SnapIn. When I do this the TabIndex of the controls is for some reason reversed and the Tab key does not stop on the RadDropDownList anymore. When I use the same User Control inside of a Form or RadForm the TabIndex is as expected and the Tab key stop on the RadDropDownList. I have verified that the TabIndex values are sequential and in the right order and that the TabStop property is True for all the controls.

After some extra digging I found that inside of MMC SnapIn the TabIndex seems to follow the order in which the RadControls are added to the User Control in the Designer code behind file. The TabIndex property is completely ignored.

I am using UI for WinForms 2015 Q3 with C# and Visual Studio 2015.

Is there some bug when RadControls don't have a parent form and are injected into some other parent container?

Dimitar
Telerik team
 answered on 06 Sep 2016
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?