Telerik Forums
UI for WinForms Forum
1 answer
270 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
140 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
225 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
210 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
230 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
149 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
405 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
342 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
79 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
1 answer
84 views
Hi! Im using Q1 2011 with VB.Net 2010
I had some issue here where will like to get the solution.
Im using Telerik Calendar where i set the multipleselect = False
mean always only 1 date is selected.

As default when run the application. SelectedDate = Today (21/09/2011)
then i select other day(23/09/2011). From calendar i always see 23/09/11 is selected.

Now i want a via code. which i will clear the selected date 23/09/2011 and via code selected date = 29/09/2011

How to do it?

Other issue:
By default my calendar selecteddate = Today(21/09/2011) and i get the value by via code and set to a label.
Now i select again the same date the value from via code, it become 01/01/1900. The correct value suppose to be 21/09/2011

The code i use to get the selected date :

msgbox(RadCalendar1.SelectedDate.Date)

Hope to get the answer as soon as posible cause this is urgent....
Thank!

Regards
Johnny


Johnny
Top achievements
Rank 2
 answered on 21 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)
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
CheckedDropDownList
ProgressBar
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
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
+129 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?