Telerik Forums
UI for WinForms Forum
2 answers
86 views
Hi,

i am currently implementing a custom filter dropdown with radgridview, but i get confused with the following problem.

For simplification just imagine i have two columns, Status and Status2.
Status is just a representation of 0 or 1. Status2 is an image representing the status.

If i click the filter symbol inside of the TableFilteringRow my custom dropdown will be opened.
After choosing an option a handler fires and the filter is being applied to the column "Status".
That works as i would expect it.

But if i try that the second time, my custom dropdown shows up, i choose another option,
the handler fires but the filter symbol seems to be still pressed. And that is the reason why the data inside the gridview cannot be filtered because the filter action is not yet finished until i click into another column/row.

See also the attached image for better understanding what i mean.

Here is the code:
Private Sub grdViewPostleitregion_ContextMenuOpening(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.ContextMenuOpeningEventArgs) Handles grdViewPostleitregion.ContextMenuOpening
        If (e.ContextMenuProvider Is Nothing) Then
 
            e.ContextMenu.Items.Clear()
 
            Dim dtMenu As New RadDropDownMenu
 
            Dim r As RadMenuItem
            Dim sepItm As RadMenuSeparatorItem
 
            'No Filter
            r = New RadMenuItem
            r.Text = "No Filter"
            dtMenu.Items.Add(r)
            AddHandler r.Click, AddressOf PostRegionNoFilter_Click
            'Separator
            sepItm = New RadMenuSeparatorItem
            e.ContextMenu.Items.Add(sepItm)
 
            'Imagefilter
            r = New RadMenuItem
            r.Image = My.Resources.Status_0
            r.Text = "OK"
            dtMenu.Items.Add(r)
            AddHandler r.Click, AddressOf PostRegionStatus0_Click
 
            r = New RadMenuItem
            r.Image = My.Resources.Status_1
            r.Text = "Warning"
            dtMenu.Items.Add(r)
            AddHandler r.Click, AddressOf PostRegionStatus1_Click
 
            e.ContextMenu = dtMenu
 
        End If
    End Sub
 
    Private Sub NoFilter_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        With Me.grdViewPostleitregion
            .Columns("Status").FilterDescriptor = Nothing
 
            .CurrentColumn = .Columns("Status")
            .CurrentRow = .MasterView.TableFilteringRow
        End With
    End Sub
 
    Private Sub Status0_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim Filter As New FilterDescriptor()
 
        Filter.Operator = FilterOperator.IsEqualTo
        Filter.Value = 0
        Filter.IsFilterEditor = False
        With Me.grdViewPostleitregion
 
            .Columns("Status").FilterDescriptor = Nothing
            .Columns("Status").FilterDescriptor = Filter
 
            .CurrentColumn = .Columns("Status")
            .CurrentRow = .MasterView.TableFilteringRow
 
            .MasterView.TableFilteringRow.Cells(0).IsSelected = True
 
        End With
    End Sub
 
    Private Sub Status1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim Filter As New FilterDescriptor()
 
        Filter.Operator = FilterOperator.IsEqualTo
        Filter.Value = 1
        Filter.IsFilterEditor = False
 
        With Me.grdViewPostleitregion
 
            .Columns("Status").FilterDescriptor = Filter
            .CurrentColumn = .Columns("Status")
            .CurrentRow = .MasterView.TableFilteringRow
 
            .MasterView.TableFilteringRow.Cells(0).IsSelected = True
        End With
    End Sub

How can i fix that?
Martin Vasilev
Telerik team
 answered on 28 Sep 2010
1 answer
103 views
Hi!

i've been trying to drop items on a tree without success.

I've set the tree to AllowDrop and after hours of trying it out I have succeded to drag on the grid using the RadGridViewDragDropService with a bound grid.

How do I get the tree to accept the drop?

thanks
- jorge
Svett
Telerik team
 answered on 28 Sep 2010
1 answer
142 views

Hi

I need to change color of text of a RadListBoxItem from the code.
Color is predefined in the applied theme (in the text item and also for mouseover and !mouseover states).
Which property in theme will allow text color to change from the code or which settings should be applied for color to be able to change it programmaticlly?

Thanks,
Vladan
Stefan
Telerik team
 answered on 28 Sep 2010
2 answers
135 views
Hi
I have an issue with am MDI applicaiton in Windows. I have a windows menu with MDIList property set to true. When I click on a document added to the list, it does not activate that document.

I want also to reproduce the context menu (New Horizontal Tab Group and New Vertical Tab Group) in my windows menu. What is the code to create a new horizontal and vertical group from an active window?

Thanks for your help

Philip
Julian Benkov
Telerik team
 answered on 28 Sep 2010
2 answers
404 views
Hi,

Most of the Windows Forms controls in Telerik implement the System.ComponentModel.INotifyPropertyChanged interface though I have noticed that it does not seem to fire whenever a property changes value.  I have noticed this in RadTextBox (Text property) and in RadDropDownList (SelectedValue property); I have not checked the other controls. 

Yes, these controls do have more specific events that fire when their value changes (TextChanged or SelectedValueChanged) but in the case of our project it is simpler to use the INotifyPropertyChanged.PropertyChanged event.

Questions:
1) Is it possible to know which control properties do fire the PropertyChanged event?
2) Are the implementations of INotifyPropertyChanged only designed to work for certain properties?

I cannot remember but I'm pretty sure previous releases used to fire this event and this only occurred with the latest release.

Thank you.
Mark
Top achievements
Rank 1
 answered on 28 Sep 2010
3 answers
185 views
Hello,

I have a RadGridView control inside a RadPageViewPage along with other editor controls.  The grid control is anchored on all sides (left+top+right+bottom) and its AutoSize is set to false.  Running the form for the first time displays no problems.  However when we open the form designer again the grid control mysteriously changes dimensions which pretty much requires us to keep resizing it every time someone needs to edit the form's layout.  This only happens when it is anchored on all sides. 



Mark
Top achievements
Rank 1
 answered on 28 Sep 2010
2 answers
525 views
I have been using CellValidating event to validate cells data that user enters in a grid. It was important that e.Row.DataBoundItem != null and represent my Entity.
For this reason I have been using 
BaseGridView_UserAddedRow event 
and BaseGridView_DefaultValuesNeeded

like this

/// <summary>
/// Set DataBoundItem when user is adding new row
/// </summary>
protected override void BaseGridView_DefaultValuesNeeded(object sender, GridViewRowEventArgs e)
{
    e.Row.DataBoundItem = new TEntity();
}
 
/// <summary>
/// Update Grid DataBountItem after saving. If don't do this, ((Entity)DataBoundItem).Id will be 0.
/// </summary>
private void BaseGridView_UserAddedRow(object sender, GridViewRowEventArgs e)
{
    e.Row.DataBoundItem = Entity;
}


now in latest build e.Row.DataBoundItem is readonly.
My questions are:
1) how to set DataBoundItem before CellValidating?
2) how to set DataBoundItem after saving data to database in case I save it during BaseGridView_RowValidating event?

Julian Benkov
Telerik team
 answered on 28 Sep 2010
1 answer
70 views
I know that my question regarding resources and appointments may be a lame question, but your documentation and demos only appear to cover superficial information.  i may look elsewhere for a scheduler control....
Stefan
Telerik team
 answered on 28 Sep 2010
2 answers
237 views
Is there any way to implement a 'SelectedIndexChanging' event for a RadComboBox?
The reason is that I need to cancel the index changed event sometimes, but I cannot since the changing event is missing in RadComboBox.
Peter
Telerik team
 answered on 28 Sep 2010
1 answer
94 views
Hi 

Suppose I have a Grid with the following columns:

  • CustomerCode
  • AccountNumber
  • AccountDescription
  • Balances

And suppose I have a Child Grid which contains the following columns

  • CustomerCode
  • AccountNumber
  • Amount
  • ReferenceNumber

The realtionship between the grids is by AccountNumber

An example of the Main Grid data would be:

123456 12345600 Savings 1000.00
123456 12345601 Fixed 5000.00
123456 12345600 Transactions 2000.00


I am dealing with a large amount of data and so I only what to populate the Child Grid where the AccountTypeDescription has a value of "Transactions"  At the moment the Child Grid is loading the transactions 3 times which I don't need.  It only needs to populate for the "Transactions" row.

Is it possible to do this?

I am using Telerik WinForms Rad Controls Q2 2009

Thanks

Julian Benkov
Telerik team
 answered on 28 Sep 2010
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
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
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?