Telerik Forums
UI for WinForms Forum
1 answer
196 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
139 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
119 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
130 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
647 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
823 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
268 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
437 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
147 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
1 answer
136 views
hi,telerik
    we are developing the winform application in telerik control,we used the RadGridView to display the data to the user,we listed all the files that came from a folder,we want to drag an item from RadGridView to desktop(item means a row,it display the information for a file,for example ,filename,datetime,author),but it failed ,it can trigger any events,or drag a file from desktop to RadGridView,it also failed,we have set the AllowDrop=true;i don't know how to implement this function,could u pls help me implement this function, it's very important to our project.my email is feiying0803@163.com;Thanks for you help...
Svett
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)
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?