Telerik Forums
UI for WinForms Forum
1 answer
301 views
1. Thanks for fixing the typo (shuld be documented in the Release Notes)
2. In my app The event does not get fired, I use it to add an indication about Item Counts per Group.

What's the strategy to update Group Summaries with custom data?
This is the code I currently use:

   void OctopusGridView_GroupSummaryEvaluate(object sender, GroupSummaryEvaluationEventArgs e) 
        { 
            string suff = String.Concat(" (", e.Group.RowCount.ToString(), ")"); 
 
            if(e.FormatString.EndsWith(";")) 
            { 
                e.FormatString = e.FormatString.Substring(0, e.FormatString.Length - 1); 
            } 
 
            if (!e.FormatString.EndsWith(suff)) 
            { 
                e.FormatString = String.Concat(e.FormatString, suff); 
            } 
        } 

Alexander
Telerik team
 answered on 08 Jul 2010
1 answer
167 views
I have created a simple winform, added a RadButton, hooked up a click event handler, and then attempted to assign shortcut keys to it but cannot get it to work at all. I am using 2010 Q1 release.

Is there a bug? If you could post a working sample of accomplishing this, I would appreciate it.
Stefan
Telerik team
 answered on 08 Jul 2010
1 answer
114 views

We had quite lot problems with the GridViewMaskBoxColumn in Numeric masktype. We use "," not "." for decimal point that coused lot of bugs in the GridViewMaskBoxColumn. And altought the grid was setted to our localization setting the GridViewMaskBoxColumn still used the point. So here is the sollution what we figured out with the help of the telerik team.

This will hold the new row after we begin the edit.
Private newRow As Telerik.WinControls.UI.GridViewDataRowInfo 

 

 

Private Sub RadGridView1_RowsChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCollectionChangedEventArgs) Handles RadGridView1.RowsChanged

 

 

 

If e.Action = Telerik.WinControls.Data.NotifyCollectionChangedAction.Add Then

 

newRow =

 

TryCast(e.NewItems(0), Telerik.WinControls.UI.GridViewDataRowInfo)

 

 

 

End If

 

 

 

End Sub

 


In CellEndEdit event we replace the point with the comma. If the row has an index of -1 then thats a newrow.

Private Sub RadGridView1_CellEndEdit(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellEndEdit  
        If e.RowIndex >= 0 And e.RowIndex < RadGridView1.Rows.Count And e.ColumnIndex >= 0 And e.ColumnIndex < RadGridView1.Columns.Count Then  
            If RadGridView1.Columns(e.ColumnIndex).GetType.Name = "GridViewMaskBoxColumn" Then  
                Dim cell As Telerik.WinControls.UI.GridViewCellInfo = RadGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex)  
                cell.Value = cell.Value.ToString().Replace("."c, ","c)  
            End If  
        Else  
            If newRow IsNot Nothing Then  
                For Each cella As Telerik.WinControls.UI.GridViewCellInfo In newRow.Cells  
                    If cella.Value IsNot Nothing And cella.ColumnInfo.GetType.Name = "GridViewMaskBoxColumn" Then  
                        cella.Value = cella.Value.ToString().Replace("."c, ","c)  
                    End If  
                Next  
            End If  
        End If  
    End Sub 

In the CreateRow we can give starting values for the cells if they were left blank.

Private Sub RadGridView1_CreateRow(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.GridViewCreateRowEventArgs) Handles RadGridView1.CreateRow  
        For i As Int32 = 0 To e.RowInfo.Cells.Count - 1  
            If IsDBNull(e.RowInfo.Cells(i).Value) Then  
                If RadGridView1.Columns(i).GetType.Name = "GridViewMaskBoxColumn" Then  
                    Dim oszlop As Telerik.WinControls.UI.GridViewMaskBoxColumn  
                    oszlop = TryCast(RadGridView1.Columns(i), Telerik.WinControls.UI.GridViewMaskBoxColumn)  
                    e.RowInfo.Cells(i).Value = "0,00" 
                End If  
            Else  
                If e.RowInfo.Cells(i).Value = "" Then  
                    If RadGridView1.Columns(i).GetType.Name = "GridViewMaskBoxColumn" Then  
                        Dim oszlop As Telerik.WinControls.UI.GridViewMaskBoxColumn  
                        oszlop = TryCast(RadGridView1.Columns(i), Telerik.WinControls.UI.GridViewMaskBoxColumn)  
                        e.RowInfo.Cells(i).Value = "0,00" 
                    End If  
                End If  
            End If  
        Next  
    End Sub 




Alexander
Telerik team
 answered on 08 Jul 2010
1 answer
94 views
We are creating a custom appointment editor dashboard that implements the IEditAppointmentDialog interface. We are not interested in inheriting from the stock dialog form however; this application addresses a business need that requires a highly customized UI for our custom Appointment derived type, and the limitations of inheriting fromt the stock form are not acceptable for this situation.

That said, casual object browser inspection of the EditAppointmentDialog lets us see that the Appointment is passed to the editor dialog by value via the Edit Appointment function. We were actually expecting that to be a reference. What we need to know, then, is what mechanism is used to pass the edited IEvent back to the Scheduler control?

Even better would be a simple overview of the the edit dialog flow. I know we could go look at the source, but if its a fairly simple then I'd rather not have to dig.



Dobry Zranchev
Telerik team
 answered on 08 Jul 2010
3 answers
108 views
I'm using the trial version of Telerik Rad WinForm Tools in Visual Studio 2010 Ultimate,
 but when I move my project in a second computer the Rad Tools doesn't work correctly.
I am asking you if the trial versions of Telerik Rad WinForm Tools have any problem and also if the new versions of Telerik Rad WinForm Tools supports all functionality of older versions.

Thank you in advance!
Vassil Petev
Telerik team
 answered on 07 Jul 2010
3 answers
563 views
First)
Need to align RadButtonElement's  to the right within RadStatusStrip.
As follows:
+------------------------------------------------------------------------------------------------------------------------------------+
                                                                                        |  radButtonElement1 |     |  radButtonElement2 |
+------------------------------------------------------------------------------------------------------------------------------------+
Is this possible?

Second)
Can give a particular theme to the radButtonElements?

Thanks
Nikolay
Telerik team
 answered on 07 Jul 2010
4 answers
765 views
Hi telerik team,


I am trying to use the RAD grid view for winform. What i need is to change the color as the user moves the mouse over the rows.
I.e. A row should change its color when user hovers the mouse and as the user leaves the mouse from this row, it should again change color. This is very critical for me so any help will be appreciated.

Please reply ASAP

Thanks
Ravi
Boryana
Telerik team
 answered on 07 Jul 2010
6 answers
235 views

FilterExpression filter = 
new FilterExpression(); 
                    filter.Predicates.Add(FilterExpression.BinaryOperation.AND, 
                       GridKnownFunction.Contains, 
                       "@FilterEditor1"); 
                    filter.Parameters.Add("@FilterEditor1", "rgvKeyword.CurrentRow.Cells[0].Value"); 
                    rgvEmails.Columns["tk_name"].Filter = filter; 

Above is my code to apply filter to the grid column "tk_name" programatically.
Filtering works great for normal alphabetic string.
But, If the filtertext contains any double quote character("), the filtering functionality won't work. it just displays all the records.

Is this a bug or Is there any escape seq. for double quote character in filtertext?

Please help.
Aswin S
Top achievements
Rank 1
 answered on 07 Jul 2010
1 answer
391 views
Hi,

I am using RadControls for WinForms Q3 2009 SP1

I created two UserControls each one has a RadGridView in it. i.e. AListControl and BListControl.
Each RadGridView is bounded to a DataSource which list objects of type A and B.
When I use the controls separately (as I should) it works fine.

Now I try to use the RadGridView of object B as a ChildGridViewTemplate of A.
To avoid recreating the whole grid definition I use the following in AListControl constructor:

 
public AListControl() 
   InitializeComponent(); 
 
   // Create dummy BListControl 
   BListControl bListControl = new BListControl(); 
 
   // Add the B's MasterGridViewTemplate to A as a ChildGridViewTemplates 
   this.radGridViewA.MasterGridViewTemplate.ChildGridViewTemplates.Add( 
      bListControl.radGridViewB.MasterGridViewTemplate); 
 
   // Add the relation 
   GridViewRelation relation = new GridViewRelation(this.radGridViewA.MasterGridViewTemplate); 
   relation.ChildTemplate = bListControl.radGridViewB.MasterGridViewTemplate; 
   relation.RelationName = "A2B"
   relation.ParentColumnNames.Add("Id"); 
   relation.ChildColumnNames.Add("B.AId"); 
   this.radGridViewA.Relations.Add(relation); 
    

I also added a menu item in the context menu that sets the DataSource of bListControl.radGridViewB.MasterGridViewTemplate.
When I set the DataSource the application fails with the exception "Object reference not set to an instance of an object."

This is the callstack I got:

     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTraverser.IsRowVisible(Telerik.WinControls.UI.GridViewRowInfo rowInfo) + 0x32 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTraverser.MoveForward() + 0x95 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTableElement.UpdateScrollbars(bool resetValue) + 0x165 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTableElement.Update_OrderChanged(Telerik.WinControls.UI.GridUINotifyAction action, Telerik.WinControls.UI.GridViewRowInfo[] rowInfos) + 0x12c bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTableElement.UpdateCore(Telerik.WinControls.UI.GridUINotifyAction action, Telerik.WinControls.UI.GridViewRowInfo[] rowInfos) + 0x74 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewTemplate.UpdateUI(Telerik.WinControls.UI.GridUINotifyAction action = SortingChanged, Telerik.WinControls.UI.GridViewRowInfo[] rowInfos) + 0x33f bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.InitializeSorting() + 0x109 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.InitDataGrid() + 0x14e bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.Bind(object dataSource, string dataMember) + 0x32c bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.DataSource.set(object value) + 0x65 bytes   
>   InspectSims.exe!Inspector.AListControl.ShowBsClicked(object sender = {Telerik.WinControls.UI.RadMenuItem}, System.EventArgs e = {System.EventArgs}) Line 62 + 0x2b bytes   C#

Can you tell me if this is the correct way to do this, or if there is another way to do this ?

Regards,
Ami

Stefan
Telerik team
 answered on 07 Jul 2010
1 answer
108 views
hi,

I have a radgridview.While clicking on the cells, I got the values in a radlabel as shown below.
But I got the error ,"Object reference not set to an instance of an object " when clicking on the gridview header or some other places in the radgridview.How can i avoid this error.

Private Sub RadGridView1_CellClick(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellClick

 

 

 

RadLabel5.Text =

 

"Selected S.No :" & e.Row.Cells("serialno").Value & " - " & e.Row.Cells("name").Value.ToString

 

Boryana
Telerik team
 answered on 07 Jul 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?