Telerik Forums
UI for WinForms Forum
2 answers
258 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
179 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
3 answers
253 views
sorry, I can not speak english very well.

why this error?

this my code :

private void gridNegara_CellClick(object sender, GridViewCellEventArgs e)
{
            int i = gridNegara.CurrentRow.Index;
            txtKodeNeg.Text = (gridNegara.Rows[i].Cells[0].Value).ToString();
            txtNamaNeg.Text = (gridNegara.Rows[i].Cells[1].Value).ToString();
            txtIbuKotaNeg.Text = (gridNegara.Rows[i].Cells[2].Value).ToString();
}

gridNegara = RadGridView
txtKodeNeg, txtNamaNeg, txtIbuKotaNeg = RadTextBox

when running visual studio (F5), an error message appears:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


It happens when I click on FilteringRow

thanks for your attention.
Emanuel Varga
Top achievements
Rank 1
 answered on 26 Dec 2010
3 answers
450 views
Hi there, 
I just got an problem with raddatagridview, i want to delete some rows...how i could do that..??
fyi i'm use mysql for the database....
thanks for your help...
Emanuel Varga
Top achievements
Rank 1
 answered on 26 Dec 2010
2 answers
446 views
Hello and merry X-mas to all.
I have following problem which I cannot solve by my own.
I have an empty GridView (not bound to any data source).
I would like to set the Grid in edit mode automatically when the user enters the grid by the tab key.

So I tried something like this, which does not work.

Private Sub RadGriedView1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGriedView1.Enter
            Dim currCell As GridViewCellInfo = Me.rgv_Certificates.Rows(0).Cells(1) 'GridCellElement
            currCell.IsSelected = True
            currCell.BeginEdit()
End Sub

I guess this would work if there are already rows with data. But my grid is empty.
How can I programmatically activate the edit mode, starting with editing the first cell in the newly added row when the user enters the grid.
Without using the mouse! Only with tab key.

Thanks for your help
Roberto
Roberto Wenzel
Top achievements
Rank 2
 answered on 26 Dec 2010
3 answers
292 views
Hi , sorry for my bad english.

I have use multiple gird in my main form (Entity framework , databindingsource) .
i have refresh button on main form and i want refresh all grid data .(data changed on other form)


what is a best solution ?


 

Emanuel Varga
Top achievements
Rank 1
 answered on 26 Dec 2010
3 answers
325 views
Hi,

we are in a process of upgrading telerik dlls periodically.

prevoiusly we are using 2009.3.9.1203 version dlls.
here we are able to add check box in the header of a RadGridView using "CheckBoxHeaderCell" class which is given in the telerik forums.
here we are not creating a checkbox column and adding it to RadGridView instead we are are getting bool values from DB and binding them to RadGridView and we are just adding Checkbox in the Header.

when we upgrade the telerik dlls to 2010.2.10.806 version we are not able to add check box as we did above.

i found some sample code in telerik forums which gives code to add the checkBox column with header.

Is it possible to add check box in the header with out creating the entire check box column
here my check box column is displayed with the DB values and i just want to add check box in the header and handle the event.

if possible please give sample code.


Thank you,
Shashi
Emanuel Varga
Top achievements
Rank 1
 answered on 25 Dec 2010
3 answers
153 views
ok here is what I want to do, and I can't get it to work right.  I have set up a few tabs.  then I want to hide the tabs with

Telerik.WinControls.

 

ElementVisibility.Collapsed;
then I want to show the ribbon tab based on code.  No matter what I try I cann't seem to get it to work.

Thanks for the help

 umm i tried to change the title to Tab but it wont let me :P

 

Peter
Telerik team
 answered on 23 Dec 2010
3 answers
111 views
Hi,

how could I make a grid automatically create a ComboBoxColumn by giving it a BindingList of custom objects? The grid only detects decimal and datetime columns corresponding to object's properties of the same type, but for the remaining properties it creates TextBoxColumns. This is correct because these properties are string but the column's type should be ComboBoxColumn. I'm guessing if there's a way to change the column's type dinamically, but the explicit cast produces an exception.

Greetings,
Giovanni

Richard Slade
Top achievements
Rank 2
 answered on 23 Dec 2010
1 answer
93 views
Hi,
I need to drop a simple plain text from a textbox into a Rad Treeview.
I just read the forum, I'm mixing OLE Drag & Drop and RadTreeView Drag & Drop. The Events seems to be right and they seems to work fine.
But I'm just having a problem with the Visual Indicators of the treeview.

When I drop a regular node inside the treeview, I can see that visual indicators (the target node is highlighted, I can see a line of dots showing the direction above or below the target node, the "forbidden" cursor, etc).
And when I actually try to drop a simple text inside the treeview, I don't see any of those stuff.
I need the same visual behavior when dropping a simple text. I need to see the indicators and I don't know how to activate them.

I will appretiate the help.

Thanks!

Gustavo
Julian Benkov
Telerik team
 answered on 23 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)
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?