Telerik Forums
UI for WinForms Forum
8 answers
219 views
Hi ALL,
   I am in need of some assistance. Software config first..
Win 7 Ult 64, Visual Studio 2010 (VB.NET 2.0, Winforms
Scheduler Q2 2011.2.831 (Latest), VistaDB (Supported
by Telerik ORM) MS SQL 200X Compatible. I have now
"Bound" the Scheduler and I can Create new appoint
ments but save makes the "Appointments" disapear!.
Has anyone ran across this with RadScheduler? (I am
not using ORM) Just the sample .mdb database (used
by telerik example) Converted to VistaDB Format. I
added "User 1", "User2", "User 3", "User 4". to the
resources part of the database and they come up
properly but I Can't figure out the Colors Part Need
Color.Transparent in all 4 spots. I am using the code
"Ivan" Provided and it is in the samples. The "Samples"
do not provide Multi - User Data Binding. It could be a
very simple line of code to solve this problem.
                                                 Thanks in advance!,
                                                                Jeff  :)     
Dim colors() As Color = {Color.Transparent, Color.Transparent, Color.Transparent, Color.Transparent}
           Dim names() As String = {"User 1", "User 2", "User 3", "User 4"}
           For i As Integer = 0 To names.Length - 1
               Dim resource As New Telerik.WinControls.UI.Resource()
               resource.Id = New EventId(i)
               resource.Name = names(i)
               resource.Color = colors(i)
               'resource.Image = Me.imageList1.Images(i)
               Me.RadScheduler1.Resources.Add(resource)
           Next i
           Me.RadScheduler1.GroupType = GroupType.Resource
           Me.RadScheduler1.ActiveView.ResourcesPerView = 2
       Catch ex As Exception
George
Top achievements
Rank 1
 answered on 20 Dec 2012
3 answers
154 views
Hi!
When I have a column as a combo (style: dropdown) then it only works properly when the user selects a value from the list. When an experienced user would type in the value himself, the entered value disappears again, it doesn't matter if you use the TAB or the ENTER.
Is there maybe some kind of property that I need to set to make the control match the entry in the textbox with the values in the list?

By the way: AutoCompleteMode is SuggestAndAppend

Regards,
Martin
Nikolay
Telerik team
 answered on 20 Dec 2012
3 answers
231 views

Hi all,
Is there a way to hide non working hours in TimelineView with Timescales.Hours/HalfHours/Minutes
 
e.g. collapse Columns before and after the WorkTime-Timespan - thus allowing shorter drag+Drop movements

|  Day  1                                               |   Day  2                                             |                             
|  08  09  10  11 12  13  14  16  18  20|  08  09  10  11 12  13  14  16  18  20|

Currently I call my own RenderView() method which loops over all visible cells

void ActiveView_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
          switch (e.PropertyName)
        {
            case "StartDate":

It would be more convinient to subscribe to a ElementRender Event and set the background color there - like the one exposed in RadCalendar.

Ivan Todorov
Telerik team
 answered on 20 Dec 2012
0 answers
141 views
Hi
I ask for help, there is a small problem.

There are two tables: the nomenclature and files.

Nomenclature hierarchy built in RadTreeView.
List of files in RadGridView
When you select a list of files filled in gridview
Doing so:

protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.nomenclatureTableAdapter.Fill(this.dataSet.nomenclature);
            this.filesTableAdapter.Fill(this.dataSet.files);

            radGridView1.DataSource = this.index3fkBindingSource;

            this.radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "ID", "FID");
        }
The first time he correctly selects and builds a hierarchy.
But when another node, it populates the file list in their previous range, and even without the hierarchy.
SubFiles is not visible and not the list of files.

Fier
Top achievements
Rank 1
 asked on 20 Dec 2012
3 answers
142 views
Is there a way to dynamically set the cell background color of a datatable? Something similar to the image attached.
Evgenia
Telerik team
 answered on 20 Dec 2012
2 answers
161 views
Hi,

I have a client server solution. Several clients connect to a single database hosting the scheduler data. When a client changes the data in the database table (adding, removing, changing an appointment) the SQL message broker kicks in and all other clients execute a function to update their scheduler. So far this works like a charm:

''' <summary>
''' Sql Server notifies the scheduler table data is changed!
''' The current scheduler data needs to rebind to reflect the changes...
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub AgendaWijziging(sender As Object, e As System.Data.SqlClient.SqlNotificationEventArgs)
    If Me.InvokeRequired Then
        RadScheduler1.BeginInvoke(New MethodInvoker(AddressOf radScheduler1_rebind))
    Else
        radScheduler1_rebind()
    End If
End Sub
 
 
''' <summary>
''' Rebind the scheduler after a database change by another client
''' </summary>
''' <remarks></remarks>
Private Sub radScheduler1_rebind()
    Try
        Me.Cursor = Cursors.WaitCursor
 
        ' attempt to find current first time slot in view (user scrolled to this time slot)
        'Dim dayView As SchedulerDayViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement)
        'Dim singleDayView As SchedulerDayViewElement = Nothing
        'Dim resetToTime As DateTime? = Nothing
        'Dim firstCell As SchedulerCellElement
        'If dayView IsNot Nothing Then
        '    singleDayView = dayView.GetDayViewElements.FirstOrDefault
        '    If singleDayView IsNot Nothing Then
        '        firstCell = singleDayView.DataAreaElement.Table.Children.First
        '        If firstCell IsNot Nothing Then
         '            resetToTime = CType(cell, SchedulerCellElement).Date (date only... no time?)
        '        End If
        '    End If
        'End If
 
        RadScheduler1.DataBind()
 
       ' go back to the timeslot the user scrolled to.. (does not work :( resetToTime contains date only )
       'If singleDayView IsNot Nothing AndAlso resetToTime IsNot Nothing Then
       '    singleDayView.DataAreaElement.Table.ScrollToTime(New TimeSpan(resetToTime.Value.Hour, resetToTime.Value.Minute, resetToTime.Value.Second))
       'End If
 
 
       ' re-initialize the sql broker notification
        _context.MonitorAgenda()
 
        
    Catch ex As Exception
        Dim currentMethode As MethodBase = MethodBase.GetCurrentMethod
        FormHelper.LogError(ex, currentMethode.DeclaringType.ToString, currentMethode.ToString)
    Finally
        Me.Cursor = Cursors.Arrow
    End Try
 
End Sub

The problem is in the commented code: After the databind is executed, the scheduler view is reset to 00:00 hour. I basically attempt to update the binding without updating the display, so when another workstation adds a appointment on a timeslot in view it just appears in the scheduler the user is looking at or (when in a timeslot out of view) would appear when scrolling. As an added bonus the scheduler contains several resources.

So how can I "detect" the start or end of the top _visible_ timeslot and then use "dv.DataAreaElement.Table.ScrollToTime(TimeSpan.FromHours(firstCell.Hour))" to Update the view after databind?
Or should I approach this differently?


regards,
Raoul

Raoul
Top achievements
Rank 1
 answered on 19 Dec 2012
3 answers
294 views
Hello
I wanted to have a column which has thousand seprator  so I used "GridViewDecimalColumn" but when I typed in the cell the thousand separator
has been disappeared and when I left the cell it was shown again. as the result of this i decided to use "GridViewMaskBoxColumn" insted ,because
it hasnt those problem .
by using GridViewMaskBoxColumn  my problem solved but I face to another problem,I need to set maximum value to this column
but I cant define MaximumValue for this column ,please help me to do this.

  GridViewMaskBoxColumn dec = new GridViewMaskBoxColumn();
            dec.FieldName = "dec";
            dec.FormatString = "{0:#,##}";
            radGridView1.Columns.Add(dec);
           

Peter
Telerik team
 answered on 19 Dec 2012
4 answers
446 views
Hello!
I am using a gridview like this:

   
private void LoadGrid()
{
    DataTable dataTable = new DataTable();
    DataColumn itemIdColumn = new DataColumn("ItemId", typeof(int));
    DataColumn itemCodeColumn = new DataColumn("ItemCode", typeof(string));
    DataColumn itemNameColumn = new DataColumn("ItemName", typeof(string));
    DataColumn sellPriceColumn = new DataColumn("SellPrice", typeof(decimal));
    DataColumn vatValueColumn = new DataColumn("VatValue", typeof(decimal));
    DataColumn itemTypeColumn = new DataColumn("ItemType", typeof(int));
 
    dataTable.Columns.Add(itemCodeColumn);
    dataTable.Columns.Add(itemNameColumn);
    dataTable.Columns.Add(sellPriceColumn);
    dataTable.Columns.Add(vatValueColumn);           
    dataTable.Columns.Add(itemTypeColumn);
    dataTable.Columns.Add(itemIdColumn);
 
 
    dataTable.BeginLoadData();
    var lst = _relatedItemBc.GetItemsForMainGrid(FilteredItem);
    for (int i = 0; i < lst.Count; i++)
    {
        DataRow row = dataTable.NewRow();
        row["ItemCode"] = lst[i].ItemCode;
        row["ItemName"] = lst[i].ItemName;
        row["SellPrice"] = lst[i].SellPrice;
        row["VatValue"] = lst[i].VATValue;
        row["ItemType"] = lst[i].ItemType;
        row["ItemId"] = lst[i].ItemID;
        dataTable.Rows.Add(row);
    }
    dataTable.EndLoadData();
 
    rbcDataGridViewMain.MasterTemplate.BeginUpdate();
    rbcDataGridViewMain.DataSource = dataTable;
    rbcDataGridViewMain.MasterTemplate.EndUpdate();
}

How can i get the informations for the current row, the row i have selected?

Thank you!
Anton
Telerik team
 answered on 19 Dec 2012
3 answers
163 views
Hi There,

I have a combobox column in a gridview, the combobox has a datasource set to a list of objects returned from my database. One of these items in this datasource is an "Other" item. I am looking for a way so that when a user clicks "Other" as the selected item the combobox can be edited and a new value inserted into the datasource.

Can anyone offer any advice on the best way to do this?

Many Thanks For The Suggestions/Help?
Ivan Petrov
Telerik team
 answered on 19 Dec 2012
1 answer
453 views
We are having two different issues with exporting using the Export To ExcelML.

First I'll show the code that we're using:

Me.RadGridView1.Columns("Date").ExcelExportType = DisplayFormatType.Custom           
Me.RadGridView1.Columns("Date").ExcelExportFormatString = " mm/dd/yyyy "           
Dim exporter As Export.ExportToExcelML = New Export.ExportToExcelML(Me.RadGridView1)           
exporter.FileExtension =
"xls"        
exporter.HiddenColumnOption = HiddenOption.DoNotExport            
exporter.ExportVisualSettings =
True         
exporter.RunExport(fileName)


The first issue. In the database we have the Date column as a DateTime datatype.  I have the Custom ExcelExportType set to only show "mm/dd/yyyy"  When it exports it will show up with that format - but the data still has the time included with it.  We need it to only export the date, not the time.


The second issue comes from trying to open the exported file.  Every time we try to open the .xls file, a warning comes up
"The file that you are trying to open, 'Filename.xls' is in a different format than specified by the file extension"
Everything still worked after that - but it is a little annoying have to go through that each time.

Please let me know of any suggestions.

Thanks.
Ivan Petrov
Telerik team
 answered on 19 Dec 2012
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?