Telerik Forums
UI for WinForms Forum
2 answers
203 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
129 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
122 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
109 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
203 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
146 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
164 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
362 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
355 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
202 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
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
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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?