Telerik Forums
UI for WinForms Forum
4 answers
199 views
Hi

I have a special requirement where all the cells of a particular column can have a different datatype (thus a different editor).

I was able to put dates, strings and numbers but I have a problem with combo. My combo has a ID and a description (showing the description). I have been able to display the combo but I haven't been able to retreive the selected item from the combo. Also, my combo is only filled when the editor is required (CellBeginEdit) which means that the description is not shown as long as I don't edit that cell.

Do you have an example that would be good for me?
Julian Benkov
Telerik team
 answered on 27 Dec 2010
1 answer
195 views

Hi,

I'm facing a problem with creating customized theme.

I don't have time to start from scratch so I based on Windows 7 Theme.

I'd like to make all rows same color by default - now it's look more or less like 'zebra', first is white second gray and so on ....

Could you please describe me how to change it using Visual Style Builder?

Regards.

Dobry Zranchev
Telerik team
 answered on 27 Dec 2010
4 answers
148 views

1. i have tree with about 4 levels
the first level i get from server code and the other
by webservice.

in the begining i just recieve
the first level
i know from advanced what is their checked property
some are:

  • 0 - Unchecked
  • 1 - Checked
  • 2 - Indeterminate
  • how can i set these values by code ,when the component can't make it itself
    , because it doesn't have childs yet (until i click on some of the first level and recive by webservice their childs. the second level)

    2. one more problem is that tri state doesn't work properly. example: one of the three childs isn't checked, the father of it, the second level is Indeterminate but the first level is Checked  instead of Indeterminate 

    Julian Benkov
    Telerik team
     answered on 27 Dec 2010
    1 answer
    317 views
    I want, when RadMaskedTextBox is clicked to position cursor at the beginning.
    Right not it is at the end of my decimal number so I can not type my number but need to do one more click to go to the begining (left) and then typing value...

    I tried this, but didn't help me.

    myNumber.SelectionStart = 0;

    Regards
    Matjaž
    Dobry Zranchev
    Telerik team
     answered on 27 Dec 2010
    2 answers
    209 views
    I'd like to know how to define a min and max date range for the scheduler. I'm in timeline view. Currently, my scheduler goes to a max of 31-dec-2010 by default. I'd like to customize that. Also, I'd like to know if there is a way to make the scheduler virtually infinite as the Silverlight Scheduler is.
    Dobry Zranchev
    Telerik team
     answered on 27 Dec 2010
    4 answers
    131 views
    I use RadControls for WinForms Q1 2009 SP1.
    The problem is that the aggregates are only updated when new items are added to my bindinglist, not when a property is just updated. I have tried different events, but no luck.

    RadGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    RadGridView1.DataSource = myBindingList; // a BindingList<T> where T have INotifyPropertyChanged implemented
                

    GridViewSummaryRowItem summaryRow = new GridViewSummaryRowItem();
    summaryRow.Add(new GridViewSummaryItem("Fiskeslag", "SUM:", GridAggregateFunction.None));
    summaryRow.Add(new GridViewSummaryItem("AntReg", "{0}", GridAggregateFunction.Sum));
    summaryRow.Add(new GridViewSummaryItem("NettoVekt", "{0}", GridAggregateFunction.Sum));
    summaryRow.Add(new GridViewSummaryItem("AntSlipp", "{0}", GridAggregateFunction.Sum));
    RadGridView1.MasterGridViewTemplate.SummaryRowsBottom.Add(summaryRow);


    When I change a property on my class (T) and call OnPropertyChanged the GridView is updated with the correct values, but the summaryrow is not. It is only updated when I do myBindingList.Add(T)
    Alexander
    Telerik team
     answered on 27 Dec 2010
    2 answers
    127 views
    Hi,
        I have the gridview and have allowed the user to add new row. When i add all the data and click on any one of the cloumn header instead of hitting enter, i get "Object reference not set to the instance of the object." .How should i solve this issue?


    With regards,
    S. Surendar
    Julian Benkov
    Telerik team
     answered on 27 Dec 2010
    1 answer
    116 views
    Hi:
    The problem is that when the field of my table in the database is numeric and I click on my multicolumncombobox, the text that appears is the first field with varchar format.
    For example I have a table named "Facturas" with fields:
    -codigoFactura: int
    -fechaFactura: varchar
    And in that table I have the record: (1,'11 / 12 / 2010')
    when I click on the multicolumncombobox, text shown is 11/12/2010, but I want the text to be 1.

    Note: This problem is only when formatting numeric fields.

    Thank you for your help.
    Julian Benkov
    Telerik team
     answered on 27 Dec 2010
    2 answers
    205 views

    Hello all! I would like to discuss an application scenario so that I, later, will be able to properly identify issue I am facing. The reason I am doing this on a WinApp is that ASP.NET scheduler turned out to be restricted and could not cope with the huge list of Resource and massive number of appointments.

    The scenario is as follows:

    • I require showing Jobs on a scheduler
    • A job has the following characteristics: It is only one day long
    • A resource (Locum (worker), in my case) can have a maximum of two jobs per day. A job has a ShiftType (Shift 1 and Shift 2). Therefore, a job’s StartTime can be (Date) + 8:00AM and EndTime be (Date) + 4:00PM. A field named JobShiftTypeID decided the shift. There are three values at current: None, Shift 1, and Shift 2. I’d like to custom paint (backgroung color/gradient) a job based upon this value
    • A job will never extend beyond 24 hours
    • Similarly, a job’s job date cannot be changed. Therefore, a job for 21-Dec-2010 will only move from one resource to another but cannot move from one date to another (Disable horizontal drag-drop). If a Job is dragged from Worker A to Worker B, then there first is required a few checks to see if the job can actually be allotted to Worker B. If not, there will be no change but a MessageBox will inform the user that the move is invalid. All this can be done through an event
    • A job can be of different types and LocumTypeID indicates the current. I’d like the job have a custom paint (an image) based upon this field’s value
    • A job has different states and JobStatusID indicates the current. Displaying an icon over the job is desired
    • Jobs are created through a well defined process and doesn’t require a scheduler. Once a job is ready for booking, the system takes each of the ready for booking job and goes through a heavy process of selecting most preferred work for it and places the result set in a temporary JobBooking table
    • Job and JobBooking has a one-to-one relation
    • The LINQ that shall feed the scheduler will fetch data through a query that’ll bring forth fields from both tables with the Job ID as the unique identifier
    • Since there is a certain amount of rules to go through upon performing and job switching, canceling, deletion etc, all operations to persists data to the DB need to hand-coded manually and the scheduler cannot be automatic in that regard
    • LINQ to SQL is used as the Data access Layer and there needs to be a way to bind the scheduler with LINQ data source or SchedularDataSource should be fed with LINQ
    • The field in JobBooking named LocumID is the common field between Locums (coming from Locum table as the primary resource) and will help place the job card against correct locum (resource)
    Job table structure is as follow:
    CREATE TABLE [dbo].[Job]
      (
       [OID] [bigint] IDENTITY(1, 1) NOT NULL,
       [BatchID] [varchar](250) NOT NULL,
       [PharmacyID] [bigint] NOT NULL,
       [BranchID] [bigint] NOT NULL,
       [PharmacyCoordinatorID] [bigint] NOT NULL,
       [LocumTypeID] [int] NOT NULL,
       [JobShiftTypeID] [int] NOT NULL,
       [JobDate] [smalldatetime] NOT NULL,
       [Rate] [money] NOT NULL,
       [RatePlus] [money] NOT NULL,
       [StartTime] [smalldatetime] NOT NULL,
       [EndTime] [smalldatetime] NOT NULL,
       [PriorityID] [tinyint] NOT NULL,
       [JobCode] [varchar](100) NOT NULL,
       [JobStatusID] [int] NOT NULL,
       [UserID] [bigint] NOT NULL,
       [RegisteredDate] [smalldatetime] NOT NULL,
       [LastModifiedAt] [timestamp] NOT NULL,
       CONSTRAINT [PK__Jobs__056690C222951AFD] PRIMARY KEY CLUSTERED ([OID] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
      )
    ON
      [PRIMARY]

    Job Booking Table structure:
    CREATE TABLE [dbo].[JobBooking](
        [OID] [bigint] IDENTITY(1,1) NOT NULL,
        [LocumID] [bigint] NOT NULL,
        [JobID] [bigint] NOT NULL,
        [BookingTime] [smalldatetime] NOT NULL,
        [LastModifiedAt] [timestamp] NOT NULL,
     CONSTRAINT [PK__Bookings__73951AED4AA30C57] PRIMARY KEY CLUSTERED
    (
        [OID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
     
    GO

    Job Supporting Tables structure:
    CREATE TABLE [dbo].[JobShiftType]
      (
       [OID] [int] IDENTITY(1, 1) NOT NULL,
       [Name] [varchar](50) NOT NULL,
       [LastModifiedAt] [timestamp] NOT NULL,
       CONSTRAINT [PK_Shift] PRIMARY KEY CLUSTERED ([OID] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
      )
    ON
      [PRIMARY]
    GO
     
    SET IDENTITY_INSERT [dbo].[JobShiftType] ON
    INSERT [dbo].[JobShiftType] ([OID], [Name]) VALUES (1, N'None')
    INSERT [dbo].[JobShiftType] ([OID], [Name]) VALUES (2, N'Shift 1')
    INSERT [dbo].[JobShiftType] ([OID], [Name]) VALUES (3, N'Shift 2')
    SET IDENTITY_INSERT [dbo].[JobShiftType] OFF
     
    CREATE TABLE [dbo].[LocumType]
      (
       [OID] [int] IDENTITY(1, 1) NOT NULL,
       [Name] [varchar](100) NOT NULL,
       [Code] [varchar](4) NOT NULL,
       [PictureID] [int] NOT NULL,
       [LastModifiedAt] [timestamp] NOT NULL,
       CONSTRAINT [PK__LocumTyp__3776C388173876EA] PRIMARY KEY CLUSTERED ([OID] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
      )
    ON
      [PRIMARY]
    GO
     
    SET IDENTITY_INSERT [dbo].[LocumType] ON
    INSERT [dbo].[LocumType] ([OID], [Name], [Code], [PictureID]) VALUES (1, N'Type A', N'P   ', 1)
    INSERT [dbo].[LocumType] ([OID], [Name], [Code], [PictureID]) VALUES (2, N'Type B', N'D   ', 2)
    INSERT [dbo].[LocumType] ([OID], [Name], [Code], [PictureID]) VALUES (3, N'Type C', N'ACT ', 3)
    SET IDENTITY_INSERT [dbo].[LocumType] OFF
     
    CREATE TABLE [dbo].[JobStatus]
      (
       [OID] [int] IDENTITY(1, 1) NOT NULL,
       [Name] [varchar](100) NOT NULL,
       [Code] [varchar](5) NOT NULL,
       [PictureID] [int] NOT NULL,
       [LastModifiedAt] [timestamp] NOT NULL,
       CONSTRAINT [PK_JobStatuses] PRIMARY KEY CLUSTERED ([OID] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
      )
    ON
      [PRIMARY]
    GO
     
    SET IDENTITY_INSERT [dbo].[JobStatus] ON
    INSERT [dbo].[JobStatus] ([OID], [Name], [Code], [PictureID]) VALUES (1, N'Ready to book', N'J_RTB', 13)
    INSERT [dbo].[JobStatus] ([OID], [Name], [Code], [PictureID]) VALUES (2, N'Pending', N'J_P', 14) INSERT  [dbo].[JobStatus] ([OID], [Name], [Code], [PictureID]) VALUES (3, N'Booked', N'J_B', 15)
    INSERT [dbo].[JobStatus] ([OID], [Name], [Code], [PictureID]) VALUES (4, N'Cancelled', N'J_CAN', 16)
    INSERT [dbo].[JobStatus] ([OID], [Name], [Code], [PictureID]) VALUES (6, N'CallBack', N'J_CAL', 17)
    SET IDENTITY_INSERT [dbo].[JobStatus] OFF

    Here are the actions that are required:

    • Be able to limit the scheduler (From 01-Jan-2009 to any specified date)
    • The date format needs to be dd-MMM-yyyy everywhere
    • The culture required is System.Globalization.CultureInfo("en-GB") everywhere
    • User be able to drag a job (appointment) only vertically
    • User be able to drag multiple-selected jobs (appointment) only vertically
    • A job cannot be stretched in any direction
    • For a Locum (resource), there can be a maximum of two jobs per day
    • Double clicking a job needs to show a custom dialog as user need not modify different aspects of a job except it’s resource (Locum)
    • The scheduler is only limited to TimeLine view grouped by Resource (Locums)
    • The jobs never have any kind of recurrence
    • Need to customize the context menu displayed on jobs and empty time slots
    • Need to control the number of day-slots displayed in the timeline view
    • Need to show a tooltip with a lot of job related info. The tooltip will show job related stuff like rates and job location and the coordinator to hail. I suppose that these fields, though not related to the scheduler, will still be available in the array of data items. I do know the appointment  class is customizable
    I'd like a detailed solution for this scenario. I'd like to know what requirements are achievable and what would the best practices. I have already consulted a magnitude of different posts and blogs and was able to get some help but they were all generic.

    Waiting for a response.

    Thanks.
    Dobry Zranchev
    Telerik team
     answered on 27 Dec 2010
    3 answers
    147 views
    Is there a way to set the height of the header area in (that displays the Page Title and Icon) in Outlook or Stack mode in the designer or at runtime.
    In my case the default size is a bit too much. The control shows ok in the designer, but at runtime, the header height is about twice as much as in the designer.

    Regards
    Erwin
    Ivan Todorov
    Telerik team
     answered on 27 Dec 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)
    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
    BindingNavigator
    Styling
    Barcode
    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
    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
    Iron
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?