Telerik Forums
UI for WinForms Forum
1 answer
301 views
I want to use collapsable Key-Name pairs, similar to Points(x,y) which show on one line but can be expanded to separate x and y lines.
But I do not see the Subclass Fields in the property grid. What is missing?

  //some Subclasses  
   [Category("Detail")]
    public class WorktypeInfo
    {
        private string _WorktypeNo;
        private   string _WorktypeName;
  
        [Category("Detail")]
        public string WorktypeNo
        {
            get
            {
                return _WorktypeNo;
            }
            set
            {
                _WorktypeNo = value;
            }
  
        }
  
  
//used in Mainclass 
  
        [Category("Detail")]
        [Description("Tätigkeitscode")]
        public WorktypeInfo WorktypeInfo
        {
            get
            {
                return _WorktypeInfo;
            }
            set
            {
                _WorktypeInfo = value;
            }
        }
  
...

Any help is appreciated...Thanks  Daniel

Ivan Petrov
Telerik team
 answered on 26 Sep 2011
1 answer
278 views
Private Sub LoadSupplierCombo()
        Cursor = Cursors.WaitCursor
        tsstatus.Text = "Loading Suppliers, please wait..."
        Refresh()
        '     cbSuppliers..MasterTemplate.AutoGenerateColumns = True
 
        Dim TicketsDA As SqlDataAdapter
        Dim TicketsDS As DataSet
        Dim TicketsDV As DataView
        Dim SQLString As String = ""
 
 
        DBOpen()
        Try
 
            SQLString = "SELECT     Supplier.SupplierName AS Supplier, Supplier.SupplierAccountNo AS [Account No] " & _
"FROM         SZTickets INNER JOIN " & _
                     " SZTicketStatus ON SZTickets.statusId = SZTicketStatus.id INNER JOIN " & _
                     " SZTicketPriority ON SZTickets.priorityId = SZTicketPriority.id INNER JOIN " & _
                     " Supplier ON SZTickets.supplierId = Supplier.SupplierID " & _
"GROUP BY Supplier.SupplierName, Supplier.SupplierAccountNo " & _
"ORDER BY Supplier DESC"
 
            Dim SQLcmd As New SqlCommand(SQLString, cnn1)
            TicketsDA = New SqlDataAdapter(SQLcmd)
            TicketsDS = New DataSet
            TicketsDV = New DataView
 
            TicketsDA.Fill(TicketsDS, "Suppliers")
            TicketsDV.Table = TicketsDS.Tables("Suppliers")
 
 
            cbSuppliers.DataSource = TicketsDV
 
            SQLcmd.Dispose()
            TicketsDA.Dispose()
 
 
 
 
        Catch ex As Exception
            g_error.DBErrorMsg("Failure to load tickets", SQLString, ex)
        Finally
            dgTickets.ResumeLayout()
            DBClose()
        End Try
        Cursor = Cursors.Default
        tsstatus.Text = ""
 
        Dim columns As RadMultiColumnComboBoxElement = cbSuppliers.MultiColumnComboBoxElement
 
        For Each column As GridViewDataColumn In columns.Columns
            column.BestFit()
        Next
 
        
    End Sub


Hi

The above code loads my multi-column list box. However I would like to add <All Suppliers> at the beginning of the list as well as the supplier. I would like this to be the item selected on load.


Also, I cant find the equivalent command for combobox.items.clear() 

How do I remove all the items?

Cheers

Baz
Svett
Telerik team
 answered on 26 Sep 2011
1 answer
149 views
Okay, I'm successfully changing the backcolor of cells in my grid based on the data being populated.

What I want to do now is when a button is clicked, check to see if any of the cells still have a red background.

However, I cannot seem to get any property that will tell me if the cell has a background color of Color.Red.

Here is the code I've been trying:

for (int iRow = 0; iRow < ProductsRadGridView.Rows.Count; iRow++)
{
          for (int iCell = 2; iCell < 6; iCell++)
          {
                    if (ProductsRadGridView.Rows[iRow].Cells[iCell].Style.BackColor == Color.Red)
                    {

                    }

                    //valid = false;
                    //MessageBox.Show("One or more Line Item Values needs modification. Please make the necessary change.);
                    //return valid;
          }
}

However, the Style.BackColor returns some ambigous name called "ControlDarkDark". This is the value regardless of the back color.

How can I check what the back color really is?

Lee

Stefan
Telerik team
 answered on 23 Sep 2011
1 answer
241 views
Hi,

I have been working on a function that allows a user to search for an appointment ID, and the appointment corresponding to the appointment ID is highlighted/selected.

I have been able to do this by using the following:
Dim appt As IEvent = Nothing
appt = GetAppointment(CLng(msSearchID))
If appt IsNot Nothing Then
   SchedulerUIHelper.SelectAppointment(radScheduler1, appt, True)
End If
Private Function GetAppointment(ByVal nID As Long) As IEvent
        Dim appt As IEvent = Nothing
        Try
            For Each a As IEvent In radScheduler1.Appointments
                If a.UniqueId.KeyValue = CStr(nID) Then
                    appt = a
                End If
            Next
            Return appt
        Catch ex As Exception
            Return appt
        End Try
End Function

However, an appointment which has a RecurrenceRule (a master appointment) is not being highlighted. Recurring Appointments are also not being highlighted, but this is understandable as radScheduler1.Appointments collection does not have separate instances of the recurrence, but it does have the master appointment.

For example, an Appointment with ID 45 is a master appointment with 4 more appointments recurring daily. If the user enters 45, we select this appointment from the GetAppointment function as shown above, then pass it to SchedulerUIHelper.SelectAppointment to highlight this. The SelectAppointment method does not work, even though we pass the correct IEvent to it.

Alternatively, if the user enters ID 33 (which is a normal appointment without any recurrence rule), then SelectAppointment function does work and the desired appointment is highlighted.

Is this a bug in SchedulerUIHelper.SelectAppointment? If so, how do I implement the same functionality as the SelectAppointment function?

Thanks, 
Ivan Todorov
Telerik team
 answered on 23 Sep 2011
3 answers
217 views
I have a multi-column combo box with 2 columns using the drop down list style.  When the user selects something new, I want to combine the text from both columns and display it in the text area.   Is this possible?  Even if I set the Text property of the combo box to something new, it still just shows the text from the first column.  It does seem to work when initializing the control but not when the selected index is changed.
Jack
Telerik team
 answered on 23 Sep 2011
4 answers
240 views
Is there a way to use the ErrorProvider with the RadGridView. Currently we are using it with the GridDataView. We are wanting to replace the DataGridView's with RadGridView, but the functionality the ErrorProvider provides with the DataGridView is important to us.

Thanks

Theo
Top achievements
Rank 2
 answered on 22 Sep 2011
2 answers
155 views
Hi,
When I try to run Adapter.Update method a SqlException occurs but DataError event doesn't fire.
I want to detect the row which have raised the exception and show errorprovider's icon on some cell. but can not do it.
please help me.
Theo
Top achievements
Rank 2
 answered on 22 Sep 2011
8 answers
421 views
I am currently using the radgridview to hold 246k rows and 13 columns of data.  I extened the radgridview so that I could handle many othe requiremnts that I have.  Even before extending the control I have noticed significant problems in selecting multiple rows.  For instance in the application I just described there is not the much data present in the grid.  To get the data I progromatically build a datatable and then attach it to the grid as the datasource.  Then I try to select multiple rows via shift + click and it will take over 25 seconds to select 100k rows.  I am not sure what is exactly causing this problem but to make things even worse when I am done with my selection and would like to lose it or make another one it takes just as long for the grid do remove the selection from the selectedrows property.  Is there anything that I can do to make this simple process respond in a reasonable manner?

I am using winforms controls 2011.1.11.419 and visual studio 2010 vb.net
Svett
Telerik team
 answered on 22 Sep 2011
5 answers
351 views
Hello!
I use a GridView bound to a data table. One of the columns in the data table stores a date information in Unix format (milliseconds since 1970). I have used a converter similar to the one described in the converting data types example.
When i use "DateTime" for the CanConvertTo method and "long" for the "CanConvertFrom" the column shows the milliseconds value and not a valid DateTime string. Changing the  "CanConvertTo" to "long" and the   "CanConvertFrom" method to "DateTime"  still keeping the "ConvertTo" method converting from "long" to "DateTime" i get valid date strings in the GridView. When I try to filter on that column I get an "InvalidCastException" in the "ConvertTo" method where the "Value" is a "DateTime" object and the destination type is Int64. 
When i change the "ConvertTo" and and "ConvertFrom" methods to check for "value" type and transform to "DateTime" iv "Value" type is "long" or "long" if "value" type is "DateTime".
Using this I get a "FilterExpressionException" with the inner exception message {"Cannot perform '>=' operation on System.Int64 and System.DateTime."} 
When i then take into account the "destinationType" in the convert method and make a transformation of the "value" object to the selected destination type the date string is again not valid (as in the first case).

Have I missed something or is there a bug?
Thanks for your help.
Stefan
Telerik team
 answered on 22 Sep 2011
1 answer
88 views
Any hints on how to edit/access existing Shapes in a Repository?  Here's an example, the Repository Item Key: PageView1_RoundRectShapeAll2.  It shows up as an orange border-looking shape.  I want to change it to a blue one.  Do I need to create a custom bitmap in Photoshop?  Doing a search for .bmp on the folder structure reveals no such file (as I'm guessing these may be system-generated?).

Thanks in advance!
Ivan Petrov
Telerik team
 answered on 22 Sep 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
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
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
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?