Telerik Forums
UI for WinForms Forum
6 answers
144 views
Hello. I have used a RadRibbonForm and dropped a Windows7Theme on it. I explicitly specified the theme name on the controls (RibbonBar, StatusStrip). The Visual Studio IDE shows me the correct Office 2010-like ribbon interface. How ever, upon running on my Windows 7 x64 machine, The rendered form look somewhat different.

Please see attached image.

Also, I'm tired of specifying the theme on every element. I'm using Visual Inheritance and my Base form has an instance of Windows7Theme element dropped on it with it's modifiers being Private. All forms inheriting the Base Form are rendering with Windows7 theme but all elements on the form(s) are not. I have asked this question here as well.

Please help me out, kindly.
Peter
Telerik team
 answered on 18 Jan 2011
2 answers
245 views
I'm attempting to bind a Grid (programmatic-approach) through LINQ. Here is the scenario: I have a table of clients. Every client has branches and coordinators. They have more collections but I don't want to expose them. I want to show the clients in a grid with different filtering criteria. For every client, the row expands to two tabs: Branches and Coordinators

The sub rows in the Branches View and Coordinator View must NOT be further expandable.

I want to select the columns to be shown in the Branches and Coordinators Details View.

I have tried these two approached with no success:

RadGridViewSearch.DataSource = from pharms in DbContext.Pharmacies
                 where pharms.IsActive && pharms.Branches.Count > 0
                 orderby pharms.Name
                 select new {
                   pharms.OID,
                   pharms.Name,
                   pharms.PhoneNumber,
                   AddressInfo = String.Format("{0} {1} {2} {3}",
                         pharms.Contact.Addresses.FirstOrDefault().HouseNumber ??
                         String.Empty,
                         pharms.Contact.Addresses.FirstOrDefault().Street ??
                         String.Empty,
                         pharms.Contact.Addresses.FirstOrDefault().Area ??
                         String.Empty,
                         pharms.Contact.Addresses.FirstOrDefault().PostCode ??
                         String.Empty),
                   CityName = pharms.Contact.Addresses.FirstOrDefault().City.Name,
                   pharms.Branches,
                   pharms.PharmacyCoordinators
                 };
 
RadGridViewSearch.DataSource = from pharms in DbContext.Pharmacies
                 from branches in pharms.Branches.DefaultIfEmpty()
                 from coords in pharms.PharmacyCoordinators.DefaultIfEmpty()
                 where pharms.IsActive && pharms.Branches.Count > 0 && pharms.PharmacyCoordinators.Count > 0
                 orderby pharms.Name
                 select new {
                   ClientOID = pharms.OID,
                   ClientName = pharms.Name,
                   ClientPhoneNumber = pharms.PhoneNumber,
                   ClientAddressInfo = string.Format("{0} {1} {2} {3}",
                         pharms.Contact.Addresses.FirstOrDefault().HouseNumber ??
                         string.Empty,
                         pharms.Contact.Addresses.FirstOrDefault().Street ??
                         string.Empty,
                         pharms.Contact.Addresses.FirstOrDefault().Area ??
                         string.Empty,
                         pharms.Contact.Addresses.FirstOrDefault().PostCode ??
                         string.Empty),
                   ClientCityName = pharms.Contact.Addresses.FirstOrDefault().City.Name,
                   BranchOID = branches.OID,
                   BranchName = branches.BranchNumber,
                   BranchPhoneNumber = branches.PhoneNumber,
                   BranchAddressInfo = String.Format("{0} {1} {2} {3}",
                          branches.Contact.Addresses.FirstOrDefault().HouseNumber ??
                          String.Empty,
                          branches.Contact.Addresses.FirstOrDefault().Street ??
                          String.Empty,
                          branches.Contact.Addresses.FirstOrDefault().Area ??
                          String.Empty,
                          branches.Contact.Addresses.FirstOrDefault().PostCode ??
                          String.Empty),
                   BranchCityName = branches.Contact.Addresses.FirstOrDefault().City.Name,
                   CoordinatorOID = coords.OID,
                   CoordinatorName = coords.FirstName + " " + coords.LastName,
                   CoordinatorCell = coords.MobileNumber,
                   CoordinatorEmail = coords.Email
                 };

The first one produces the desired result in short time but the results are uncontrolled. I cant prevent deep-drilling, Tabs names, and Columns. The second one produces liners results and hence that fails as well. And the second one takes massive time...

Can anyone guide on this?

Objective: Create Master details grid with full control of all Column Headers (Master + Detail), All details Tabs Names
Julian Benkov
Telerik team
 answered on 18 Jan 2011
9 answers
608 views
Are there any examples for doing an auto-complete with the WinForms GridView?  If not, is this something that can easily be done with the WinForm GridView?
Svett
Telerik team
 answered on 18 Jan 2011
2 answers
335 views
Hello my friends,

Is there a nice way for letting the user to set default values for some of the columns for new row? (when adding new row it will contains the default values (template row or something like this))

Another little question: can you tell me where i can find winforms grid view advanced demos? most of the demos i saw in the telerik tv are in high level.

Thank you very much!
Tomer
Richard Slade
Top achievements
Rank 2
 answered on 18 Jan 2011
3 answers
221 views
Hi:
I need to put a code with which the color of my button is the same that appears when you put your mouse over it.
Thanks.
Richard Slade
Top achievements
Rank 2
 answered on 18 Jan 2011
1 answer
162 views
Hello,

I was wondering how I can go about interacting with the a radgridview on an active documentwindow. Here is my scenario:

1. Using a RadRibon form
2. Using RadDock with Autodetect MDI form
3 toolwindow with TreeView.
4. TreeView is filled from a dataset / datatable which is filled from SQL database

each node of the tree view has a unique SQL statement associated with it. This is my code when doubleclicking the node:

Private Sub TV_Reports_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TV_Reports.MouseDoubleClick
Try
    Dim filter As String = "ID='" & TV_Reports.SelectedNode.Tag.ToString & "'"
    For Each row As DataRow In ds.Tables("TreeView_Reports").Select(filter)
        If row("Menu_Type").ToString = "Report" Then
            Me.SqlReportStr = row("Sql_Query")
            Me.Parent_StatusStripLabel.Text = "Running report: " & row("Name")
            Me.Parent_StatusStrip.Update()
            Me.Parent_StatusStrip.Refresh()
            Dim frm As New Form_Report
            frm.Text = "Report: " & row("Name")
            frm.MdiParent = Me
            frm.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
            frm.Dock = DockStyle.Fill
            frm.WindowState = FormWindowState.Maximized
            frm.Show()
        End If
    Next
Catch ex As Exception
End Try
End Sub

the public variable SqlreportStr is set so the Report form can read it and run the query

Public Class Form_Report
    Dim ds As New DataSet
    Dim DT_Report_Results As New DataTable("ReportResults")
    Dim SqlReportStr As String = Nothing
    Dim jobcount As Integer = 0
  
    Private Sub Form_Report_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        ds.Clear()
        ds.Dispose()
        Me.Dispose()
        Me.Cursor = Cursors.Default
  
        GC.Collect()
        GC.WaitForPendingFinalizers()
        GC.WaitForFullGCComplete()
        GC.WaitForFullGCApproach()
        GC.Collect()
    End Sub
  
  
    Private Sub Form_Report_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ds.Tables.Add(DT_Report_Results)
        SqlReportStr = Form_Parent.SqlReportStr
        Me.Cursor = Cursors.WaitCursor
  
        Dim Search_Worker As New BackgroundWorker
        jobcount += 1
        AddHandler Search_Worker.DoWork, New DoWorkEventHandler(AddressOf StartReportFill)
        AddHandler Search_Worker.RunWorkerCompleted, _
        New RunWorkerCompletedEventHandler(AddressOf Search_worker_RunWorkerCompleted)
        Search_Worker.RunWorkerAsync()
        Search_Worker.Dispose()
    End Sub
  
  
    Private Sub StartReportFill(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
        FillSqlDs("ReportResults", SqlReportStr)
    End Sub
    Private Sub Search_worker_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs)
        jobcount -= 1
        GridLayout()
        Me.Cursor = Cursors.Default
    End Sub
    Private Sub GridLayout()
        Try
            GV_Reports.DataSource = ds
            GV_Reports.DataMember = "ReportResults"
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        GV_Reports.Columns("Sys_ID").IsVisible = False
        Form_Parent.Parent_StatusStripLabel.Text = "Ready!"
        Form_Parent.Parent_StatusStrip.Update()
        Form_Parent.Parent_StatusStrip.Refresh()
    End Sub
    Private Sub FillSqlDs(ByVal tbl As String, ByVal qry As String)
        If Form_Parent.MyConnection.State = ConnectionState.Closed Then
            Form_Parent.MyConnection.Open()
        End If
        'Using Form_Parent.MyConnection
        Dim Dadapter As New SqlDataAdapter
        Using Dadapter
            Try
                Dadapter.SelectCommand = New SqlCommand(qry, Form_Parent.MyConnection)
                Dadapter.Fill(ds, tbl)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Using
    End Sub
End Class


The problem that I have is that this form could be open several times at once displaying different data as the SQL queries are differnet. Also looking at the name of the form it comes accorss as Form_Report1, Form_report2 etc depending on what instance of the form that it is.

I am looking to be able to do the following with the girds:
1. export to excel
2. process each row of the grids in order to make other database changes.

if some one could point me to how I could exactly about interacting with the gridview i would greatly appreciate it.

thanks!

Jonathan
Martin Vasilev
Telerik team
 answered on 17 Jan 2011
3 answers
255 views
Hi,

I have a problem with ColumnChooser in RadGridView.

Please tell me how can I monitor when column visible state changed (For example when I drag and drop column from ColumnChooser to RadGridView or double click on it) ? 

There may be some event ? 


Any help would be appreciated!

Regards!
Pavel
Top achievements
Rank 1
 answered on 17 Jan 2011
1 answer
151 views
Hi,
I am working on a radcontrols win forms application. In some cases I got an arithmetic overflow error.
The problem is not consistant. Last time the problem occured when I was trying to open the login form by clicking the radbutton menu item.
I have used the roundrectangle shape in all the forms to shape the controls.Is that the problem?
Can anyone tell me what is the problem ?

Regards
Ajith
Richard Slade
Top achievements
Rank 2
 answered on 17 Jan 2011
2 answers
919 views
I have a DateTimePicker Control.  I have set the ShowCheckBox Property to True.  I would like this checkbox to enable/disable the datetimepicker based on weather it is checked or not.  I'm surprised it doesn't do this by default.  Nor is there any other property to set to allow this behavior.  I also can't find any event to hook into that would allow me to achieve the desired results.

I did find through the smart tags how I could disable the two "parts" of the DateTimePicker (RadDateTimePickerArrowButtonElement, and RadMaskEditBoxElement) during design time.

Another approach, I guess that works is to attached to the value changed event.  This way as soon as a user sets the value from null to something, the checkbox could be checked for them.  This allows them to have the correct checkbox state, without manually checking it themselves.

Any help would be appreciated.


Thanks, 
Richard Slade
Top achievements
Rank 2
 answered on 17 Jan 2011
4 answers
184 views
Hi ,
    We want to set record navigator to the grid which shows us total rows in the grid and it shows like "Record 5 of 2000" ..
Richard Slade
Top achievements
Rank 2
 answered on 17 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)
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?