Telerik Forums
UI for WinForms Forum
1 answer
137 views
Hi,
I have a gridview populated from a List<> and i want to be able to modify, delete or to add a new row (by clicking on "Add new row " at the bottom of the grid) directly on grid . After the user fills out all columns, he will click on a save button outside the grid. Now, i want to know how to iterate between gridview rows to know wich rows were added an wich were modified, deleted....
And depeding on the row state, i'll do an insert, update or delete on the Database.

Thank u very much!
Svett
Telerik team
 answered on 24 Jun 2011
4 answers
133 views

Hello I have created this simple bit of code that displays a hierarchial orders grid (see screen1.jpg)

Now I want to hide the +/- buttons if there are no rows (ie Order Ref 2 & 4) - Having searched the threads and copied the functions from those threads (RadGridView1_ViewCellFormatting,IsExpandable & RadGridView1_ChildViewExpanding)

It just hides them all because rowInfo.ChildRows.Count =0! (as per screen2.jpg)

Can anybody spot where I'm going wrong?


Many thanks

Terry

 

 


Public
Class Form1
  
      
  
      
    Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim myOrders = New BindingList(Of Order)()
        Dim myOrderLines = New BindingList(Of OrderLines)()
  
        myOrders.Add(New Order(1, "01/01/2011", "Order for Warehouse"))
        myOrders.Add(New Order(2, "03/05/2011", "Order for home"))
        myOrders.Add(New Order(3, "12/05/2011", "Order ref xyz"))
        myOrders.Add(New Order(4, "16/05/2011", "Order ref abc"))
  
        myOrderLines.Add(New OrderLines(1, "Power Supply"))
        myOrderLines.Add(New OrderLines(1, "Hard Disk"))
        myOrderLines.Add(New OrderLines(3, "Keyboard"))
        myOrderLines.Add(New OrderLines(3, "Mouse"))
  
        RadGridView1.AutoGenerateHierarchy = False
        RadGridView1.AutoGenerateColumns = True
  
        Dim OrderLinesTemplate As New GridViewTemplate
        OrderLinesTemplate.AllowAddNewRow = False
         
  
        OrderLinesTemplate.DataSource = myOrderLines
        'RadGridView1.MasterTemplate.Templates.Add(RolesAndPositionTemplate)
        Me.RadGridView1.MasterTemplate.Templates.Add(OrderLinesTemplate)
  
        'create the relation
        Dim relation As New GridViewRelation(RadGridView1.MasterTemplate)
        relation.RelationName = "Order Lines"
        relation.ParentColumnNames.Add("OrderId")
        relation.ChildColumnNames.Add("OrderLineId")
        relation.ChildTemplate = OrderLinesTemplate
        Me.RadGridView1.Relations.Add(relation)
  
        Me.RadGridView1.DataSource = myOrders
  
  
  
    End Sub
    Private Sub RadGridView1_ViewCellFormatting(sender As Object, e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles RadGridView1.ViewCellFormatting
  
        Dim cellX As GridGroupExpanderCellElement = TryCast(e.CellElement, GridGroupExpanderCellElement)
        If cellX IsNot Nothing AndAlso TypeOf e.CellElement.RowElement Is GridDataRowElement Then
  
            If Not IsExpandable(cellX.RowInfo) Then
                cellX.Expander.Visibility = ElementVisibility.Hidden
            Else
                cellX.Expander.Visibility = ElementVisibility.Visible
            End If
        End If
  
  
    End Sub
  
    Private Function IsExpandable(rowInfo As GridViewRowInfo) As Boolean
  
        If rowInfo.ChildRows IsNot Nothing AndAlso rowInfo.ChildRows.Count > 0 Then
            Return True
        Else
            Return False
        End If
  
    End Function
  
    Private Sub RadGridView1_ChildViewExpanding(sender As Object, e As Telerik.WinControls.UI.ChildViewExpandingEventArgs) Handles RadGridView1.ChildViewExpanding
        e.Cancel = Not IsExpandable(e.ParentRow)
    End Sub



Martin Vasilev
Telerik team
 answered on 24 Jun 2011
1 answer
93 views
Hi Guys,
    We are working in the Q2 SP1 version. I got one Problem in the Auto suggest functionality in the GridViewComboBox Column in the GridView.

My Requirement is: If i enter the letters as "dab", the Resulting options with in the Combobox is starting with the "dab" options with in the ComboBox Column. But now m getting "dab" options is the Last options in the List, I mean before this option, starting options will starts with c Options. If u want more Clarity see the attachment for Normal dropdown, i need the exact requirement in the GridView Combobox Columns. If it is not possible in the Normal GridView Combobox Column, Pls provide the alternative solution to achieve this functionality.

Thanks,
Karthikeya.
Nikolay
Telerik team
 answered on 24 Jun 2011
1 answer
111 views
How can I change the background color of a new row that has just been added. I am currently using RowFormatting for other conditions. Basically, I want to show the user when a value in a cell in a row has changed, or when they add a row. Any suggestions?
Chris
Top achievements
Rank 1
 answered on 23 Jun 2011
2 answers
93 views
Hi

Does ExportToExcelML  can export grid even if it has ChildGrid?  
if Yes any sample code ?

Regards
Nathaniel
Top achievements
Rank 1
 answered on 23 Jun 2011
3 answers
83 views
Under the newest Telerik controls for Winforms (2011.1.11.419) -- Ungrouping seems to have changed. Instead of being able to drag from the group panel to ungroup - you must hit the "X". My users have a problem with this and would prefer the Drag and Drop Ungrouping feature.

Was this removed? And if so, is there a workaround I might employ?

Thanks
Jack
Telerik team
 answered on 23 Jun 2011
3 answers
116 views
I want to add a confirm dialog when a user tries do close a dockwindow, I'm using the raddock as a mdicontainer, I use the DockWindowClosing event:

private void radDock1_DockWindowClosing(object sender, DockWindowCancelEventArgs e)
{
  if (RadMessageBox.Show("Are you sure", "Confirm", MessageBoxButtons.YesNo, RadMessageIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.No) {
      e.Cancel = true;
  }
}

The problem is that when I call RadMessageBox.Show, all the contents of the radwindow disappear.

How can I fix this so that I can ask for confirmation when closing a raddock window?

Thanks in advance.
Sergi
Top achievements
Rank 1
 answered on 23 Jun 2011
2 answers
159 views
We are trying to migrate an Access application to .Net.  To do this we use Microsoft's interop toolkit which allows us to create ActiveX controls in .Net.  So what it basically comes down to is this: we create a new interop user control, place some WinForms controls on it, build and register the assembly and use it in Access.

After some extensive tests we noticed that Telerik's WinForm controls do not behave well in an Access environment.  In a .Net application the controls work just fine.

Here's some examples of things we've seen:

  • RadGridView: crashes when leaving cells with a RadSpinEditor as their editing control.  The application shuts down without showing an error.  The event log mentions exception 0xc0000fd, which appears to be a stack overflow.
  • RadGridView: columns using RadSpinEditor cannot be edited.
  • RadContextMenu: navigating through the menu using the arrow keys scrolls 3 items up or down instead of one.

I know the controls are not exactly intended to be used like this, but is there anyone else who had similar experiences with the WinForms controls?  And has a solution to make the controls more stable?


Greetings,

Kris
Kris
Top achievements
Rank 1
 answered on 23 Jun 2011
1 answer
126 views
hi I have a checkbox where I need to check something if it is selected.  In the cellbeginedit event I check the value of the checkbox but it is false when I clearly set it to true. Is there a different way to approach this?  All I need to do is call a function if the checkbox is set to ticked.  The column is also added at run time if that helps. Thanks.

Stefan
Telerik team
 answered on 23 Jun 2011
1 answer
362 views

Hi

How to sort pages in RadPageView?

I was looking for method Sort or Comparer property but I did not find anything. Is it possible to sort pages in RadPageView?

I use version 2011.1.11.419.

Regards

Stefan
Telerik team
 answered on 23 Jun 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)
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?