Telerik Forums
UI for WinForms Forum
5 answers
291 views

Special characters should be validated in the grid view filter cell & Custom filter dialog from context menu

 

I  tried the following ways and it was successful for Rad grid view filter cell

 

I tried validating in filter changing event while the user enters in the filter cell

 

If (grid.IsInEditMode = True) Then

                If (grid.ActiveEditor.Value IsNot Nothing) Then

                    Dim strFilterCellValue As String = grid.ActiveEditor.Value

                    If (strFilterCellValue.Contains("*") Or strFilterCellValue.Contains("[")) Then

                        Dim lastIndexOfFilterCell As Integer = strFilterCellValue.Count - 1

                        Dim strNewFilterCellValue As String = strFilterCellValue.Remove(lastIndexOfFilterCell, 1)

                        grid.ActiveEditor.Value = strNewFilterCellValue

                        grid.CurrentCell.Editor.BeginEdit()

                        Return 1

                        Exit Function

                    End If

                End If

            End If

 

And for Custom filter menu

 

            If (cellValue IsNot Nothing) Then

                Dim totalCount As Integer = cellValue.Count

                If (cellValue.Contains("*")) Then

                    Dim indexOfStar As String = cellValue.IndexOf("*")

                    Dim numOfCharsRemoved As String = totalCount - indexOfStar

                    Dim strNewFilterCellValue As String = cellValue.Remove(indexOfStar, numOfCharsRemoved)

                    grid.CurrentCell.Value = strNewFilterCellValue

                    grid.MasterGridViewTemplate.FilterExpressions.EndItemUpdate()

                    Return 2

                    Exit Function

                End If

                If (cellValue.Contains("[")) Then

                    Dim indexOfOpenBracket As String = cellValue.IndexOf("[")

                    Dim numOfCharsRemoved As String = totalCount - indexOfOpenBracket

                    Dim strNewFilterCellValue As String = cellValue.Remove(indexOfOpenBracket, numOfCharsRemoved)

                    grid.CurrentCell.Value = strNewFilterCellValue

                    grid.MasterGridViewTemplate.FilterExpressions.EndItemUpdate()

                    Return 2

                    Exit Function

                End If

 

The issue is I m unable to validate both together  that is for custom filter option & while the user enters in the filter cell

 

Thanks,

Julian

Achuthan
Top achievements
Rank 1
 answered on 10 Jan 2011
2 answers
141 views
Hi guy! I have a question about RadScheduler. How can I change back color/Forecolor for each Appointment object in RadScheduler?. For instance, I got 2 object : app1(Appointment object), app2(Appointment object). I want app1 get red color when it show on radScheduler and app2 will get grey color also .

Thanks

Tran Dat
tran
Top achievements
Rank 1
 answered on 10 Jan 2011
4 answers
195 views
I've worked with menu merging with the default VS components long enough to be comfortable. I'm now working with RADMenu now but am a bit stuck.

With a MDI parent and MDI child, everything looks like it's merging like I'm used to.

I don't see the same menus merging when I add a RADDock control to the MDI parent and make any of the MDI child forms display as Document Windows. Any ideas what I might be missing or how I can accomplish this merge scenario?

Thanks

:)
jr
Bruce
Top achievements
Rank 1
 answered on 09 Jan 2011
3 answers
139 views
Is there an event that is thrown when a gridview is expanded or collapsed via the + or minus - being clicked in the parent row?

I have tried using the event, GroupExpanded but it is not being thrown.

The underlying reason for this is that my entire program has a black background, but when I use the RadGridView and set its DockStyle to Fill, the area not populated by the rows is defaulted to white.  I have not been able to change the color of this portion of the control, so I am using a Black panel behind the RadGridView, and dynamically changing the height of the GridView when rows are added via the RowsChanged event.
Richard Slade
Top achievements
Rank 2
 answered on 07 Jan 2011
9 answers
606 views

Hi

How can I change back color of group panel?

(This panel wit text: „Drag a column here to group by this column.”)

 

Regards

Richard Slade
Top achievements
Rank 2
 answered on 07 Jan 2011
3 answers
1.0K+ views
Column header texts and sizings are not accepted regardless if they are set through property builder or through columns property. If AutoGenerateColumns is set to true, database column names in default sizing are displayed, if AutoGenerateColumns is set to false, nothing is displayed.
Richard Slade
Top achievements
Rank 2
 answered on 07 Jan 2011
4 answers
186 views
Hi!

I am having what I believe should be a simple problem but which I cannot seem to solve!

I have a menu bar onto which I have placed a number of buttons and a RadMenuComboItem the items for which I populate in code via an array list as below (clsDropDown is simply a method to assign the display and value members as Longname and ID respectively).

List.Add(New clsDropdownList("Items Awaiting Collection", 1))
        aList.Add(New clsDropdownList("Items Part Collected", 2))
        aList.Add(New clsDropdownList("Items Collected", 3))
        aList.Add(New clsDropdownList("All Items", 0))


        rddlCollectionStatus.ComboBoxElement.DataSource = aList
        rddlCollectionStatus.ComboBoxElement.DisplayMember = "Longname" ' The combo class always uses 'Longname' for the dropdown text  
        rddlCollectionStatus.ComboBoxElement.ValueMember = "ID"         ' The combo class always uses ID for the dropdown key value 
        rddlCollectionStatus.ComboBoxElement.SelectedIndex = 0

        rddlCollectionStatus.Enabled = True

Within code I can retrieve the ID of the currently selected item and use this to filter following the press of a button from the menu bar, what I cannot do is find an event that fires when the combo box selection changes (I would have expected rddlCollectionStatus_Click or an equivalent to fire but none are seeming to do so).

If anyone can provide a pointer to this it would be much appreciated as it is a little 'clunky' to have to once made the selection on what to filter on to then have to press a button to apply this selection.

Many thanks,

James
Richard Slade
Top achievements
Rank 2
 answered on 07 Jan 2011
4 answers
176 views
Hello,

I've a simple problem which I can't solve. In my C# Office application, the user can input a username and password. After he has saved the data he will be able to change the values.

This is where it goes wrong.
try
               {
                   DataRow[] platformRow = dsPlatformsxml.Tables[0].Select("ID = '"+txtID.Text.ToString()+"'");
                   DataRow drUpdate = platformRow[0];
                   drUpdate[2] = txtUsername.Text.ToString();                                      
               }
               catch (Exception ex)
               {
                   string test = ex.Message;
               }

At this line drUpdate[2] = txtUsername.Text.ToString(); the system goed to the catch section and this is the stacktrace in Telerik.Wincontrols.UI.

at Telerik.WinControls.UI.SelfReferenceDataBinding.UpdateItem(Int32 index)
   at Telerik.WinControls.UI.SelfReferenceDataBinding.dataManager_ListChanged(Object sender, ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
   at System.Data.DataView.OnListChanged(ListChangedEventArgs e)
   at System.Data.DataView.IndexListChanged(Object sender, ListChangedEventArgs e)
   at System.Data.DataView.IndexListChangedInternal(ListChangedEventArgs e)
   at System.Data.DataViewListener.IndexListChanged(ListChangedEventArgs e)
   at System.Data.Index.<OnListChanged>b__2(DataViewListener listener, ListChangedEventArgs args, Boolean arg2, Boolean arg3)
   at System.Data.Listeners`1.Notify[T1,T2,T3](T1 arg1, T2 arg2, T3 arg3, Action`4 action)
   at System.Data.Index.OnListChanged(ListChangedEventArgs e)
   at System.Data.Index.OnListChanged(ListChangedType changedType, Int32 newIndex, Int32 oldIndex)
   at System.Data.Index.RecordStateChanged(Int32 oldRecord, DataViewRowState oldOldState, DataViewRowState oldNewState, Int32 newRecord, DataViewRowState newOldState, DataViewRowState newNewState)
   at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState oldState2, DataViewRowState newState2)
   at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
   at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean fireEvent)
   at System.Data.DataRow.SetNewRecord(Int32 record)
   at System.Data.DataRow.EndEdit()
   at System.Data.DataRow.set_Item(DataColumn column, Object value)
   at System.Data.DataRow.set_Item(Int32 columnIndex, Object value)
   at WordAddIn.SaveForm.btnChangePlatformOk_Click(Object sender, EventArgs e) in C:\.NET Projecten\Word Add-in\WordAddIn\WordAddIn\FormSave\SaveForm.cs:line 634


Does anybody knows what the cause is for this error, I'm trying to solve it for 2 hours, but can't find why "Object reference not set to an instance of an object is showing"...
Richard Slade
Top achievements
Rank 2
 answered on 07 Jan 2011
7 answers
507 views
Hi,
i'm having trouble with creating custom aggregate function for the WinForms grid, all i see is the AggregateExpression property that lets me do basic stuff like dividing and multiplying built-in aggregate functions, but what i need is a custom way to calculate stuff, i did this with the asp.net grid, but the winforms seems to work different.

your online help has some conflicts, there is a place where it specifically tells you to create a class like that:
Public Class CustomSummaryItem
    Inherits GridViewSummaryItem
but when i try to do this the GridViewSummaryItem has no virtual/abstract method:
Public Overrides Function Evaluate(ByVal row As IHierarchicalRow) As Object

please help me out, Thanks.

i have 2010.2.10.914 version.


Alexander
Telerik team
 answered on 07 Jan 2011
7 answers
468 views
I have a min and max allowable value set.  When the user enters "110" and the min is 0 and the max is 100, the control automatically adjusts the value to "100", the max.

Is there a way to stop this from happening?
Peter
Telerik team
 answered on 07 Jan 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)
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
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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?