Telerik Forums
UI for WinForms Forum
1 answer
161 views
Hi There

I'm having some trouble with the order of events for the Cell Format

We do some conditional cell formatting based on values returned from a database, such as what days to block - holidays etc
I managed to get it to work fine the first time round 

The issue arises on the following Navigator events
  • NavigateBackwardsClick
  • NavigateForwadsClick

as the following event fires before the Navigate event

  • Scheduler.CellFormating

This seems quite strange, I would have thought that they would be reversed.

How can I call a refresh of the data method and which event should it go in 
  • exceptionTimes = _service.GetSchedulerExceptionTimesByDateRange(RangeStartDate, RangeEndDate)

As putting the values in the Navigate events makes the cellformating event use the previous 
range of exception times for the previous date range as defined before the navigate event.

Below is some example code 
Private Sub snMain_NavigateBackwardsClick(sender As Object, e As EventArgs) Handles snMainNav.NavigateBackwardsClick
 
    RangeStartDate = rsScheduler.ActiveView.StartDate.AddDays(-1)
    RangeEndDate = rsScheduler.ActiveView.EndDate.AddDays(1)
 
    exceptionTimes = GetSchedulerExceptionTimesByDateRange(, RangeStartDate, RangeEndDate)
    GetAppointmentsByDateRange()
 
 End Sub
 
Private Sub rsScheduler_CellFormatting(sender As Object, e As SchedulerCellEventArgs) Handles rsScheduler.CellFormatting
    ' Other Code
    For Each Exception In exceptionTimes
        'Block etc
 
    Next
 
End Sub

Ivan Todorov
Telerik team
 answered on 21 Dec 2012
1 answer
962 views

I would like for my grid to autosize according to the form size. When the form is resized, I would like the grid to expand. Is there a setting for this anywhere?

Anton
Telerik team
 answered on 21 Dec 2012
3 answers
390 views
Hi,

How to apply (by c# code) custom style (fore color, back color, font etc..) to only specific column, so style will affect all data in that column? I also want change style for individual column header cell and summary cell.
I'm only interested in the change of these properties in some of the columns, not all.

Plamen
Telerik team
 answered on 21 Dec 2012
4 answers
170 views
How can I give the user the ability to click on the popup alert and perform some action?  I do not see a CLICK event on the popup object.
Marek Kruk
Top achievements
Rank 1
 answered on 21 Dec 2012
1 answer
99 views
Context menu is expanding slowing on any usercontrol and rad gridview control. Also on 3rd Party control like Stockchart. It takes approx 2 seconds to pop-up.
Ivan Petrov
Telerik team
 answered on 21 Dec 2012
2 answers
131 views
Hello,

Edit: Sorry for topic name. Can't update it after posting.

I have RadMultiColumnComboBox in GridView.
I replace editor for that column like that:
private void GridView_EditorRequired(object sender, EditorRequiredEventArgs e)
{
   if (e.EditorType == typeof(RadMultiColumnComboBoxElement))
   {
       PersonChecker newEditor = new PersonChecker();
       e.Editor = newEditor;
   }
}

and this is my custom class:

public class PersonChecker : BaseInputEditor
{
    public override object Value
    {
        get
        {
            String all = "";
 
            RadMultiColumnComboBoxElement editor = ((RadMultiColumnComboBoxElement)this.EditorElement);
 
            foreach (GridViewRowInfo gvri in editor.Rows)
            {
 
                if (Convert.ToBoolean(gvri.Cells[0].Value) == true)
                {
                    if (all != "")
                        all += "; ";
 
                    all += Convert.ToString(gvri.Cells[1].Value);
 
                }
            }
 
            return all;
        }
        set
        {
            Console.WriteLine("to do");
        }
    }
 
    protected override RadElement CreateEditorElement()
    {
        RadMultiColumnComboBoxElement editor = new RadMultiColumnComboBoxElement();
 
        editor.EditorControl.AutoGenerateColumns = false;
        editor.Columns.Clear();
         
        GridViewCheckBoxColumn check = new GridViewCheckBoxColumn();
        check.HeaderText = "";
        check.Name = "Check";
        check.MinWidth = 40;
        check.MaxWidth = check.MinWidth;
        check.ReadOnly = false;
        editor.Columns.Add(check);
     
        GridViewTextBoxColumn username = new GridViewTextBoxColumn();
        username.HeaderText = "Username";
        username.Name = "Username";
        username.MinWidth = 200;
        editor.Columns.Add(username);
 
        editor.Rows.Clear();
 
        editor.Rows.Add(new Object[] { false, "Person 1" });
        editor.Rows.Add(new Object[] { false, "Person 2" });
        editor.Rows.Add(new Object[] { false, "Person 3" });
 
 
        //foreach (Person person in FormMain._persons)
        //{
        //    editor.Rows.Add(
        //    new Object[] { false, person.SP_Username }
        //  );
        //}
 
 
        editor.EditorControl.ShowRowHeaderColumn = false;
        editor.AutoSizeDropDownToBestFit = true;
 
        editor.PopupClosing -= Editor_PopupClosing;
        editor.PopupClosing += Editor_PopupClosing;
 
        editor.EditorControl.CellClick -= EditorControl_CellClick;
        editor.EditorControl.CellClick += EditorControl_CellClick;
 
        return editor;
    }
 
    private void EditorControl_CellClick(object sender, GridViewCellEventArgs e)
    {
        if (e.ColumnIndex == 0 && e.RowIndex > -1)
        {
            e.Row.Cells[0].Value = !Convert.ToBoolean(e.Row.Cells[0].Value);
        }
    }
 
    private void Editor_PopupClosing(object sender, RadPopupClosingEventArgs args)
    {
        if (args.CloseReason == RadPopupCloseReason.Mouse)
        {
            args.Cancel = true;
        }
    }
 
    public override void BeginEdit()
    {
        base.BeginEdit();
        this.EditorElement.Focus();
    }
 
    public override bool EndEdit()
    {
        return base.EndEdit();
    }
 
    public override Type DataType
    {
        get { return typeof(string); }
    }
 
}

So basically when user edit cell, another grid (custom editor) will show and user can check few person. After editing value in that cell will be set like Person 1; Person 2; Person 3.

This all work just fine but i have problem with text in that cell when user is in edit mode.
After entering edit mode cell text automatically change to "False".
When user check some rows cell text also change according to checked state "False" or "True".

How to avoid that text changing?
I want see my current string (depend what was checked) "Person 1; Person 2; Person 3" in grid cell also in edit mode so will be always updated information.
I another words, how to control text displayed in cell when user is in edit mode? 






konrad
Top achievements
Rank 1
 answered on 21 Dec 2012
3 answers
110 views
Hi,

One of the things I find missing in the Outlook mode of the PageView control is the ability to move a page up or down (i.e., change their order). This is accomplished with an additional menu item called "Navigation Pane Options", and a checked list box with all available pages and up/down buttons.

It seems fairly obvious this functionality isn't included out of the box. Is there a straight-forward way to add it (i.e., add a menu item which could bring up my own dialog for accomplishing this)?

Related to this would be a way to serialize the PageView content and order to XML, but I can see how to do that myself fairly easily with an extension method.

Dave
Plamen
Telerik team
 answered on 20 Dec 2012
1 answer
324 views
Hi

I have a ListView in IconViewMode with enabled checkboxes. I need to enable and disable the checkboxes themselves based on some requirments.

I have managed to disable but keep them visible  using the VisualItemFormatting method and turning the ToggleElement.Enabled to false

I am having a problem accessing the ToggleElement from anywhere else.
I need to access the checkbox itself the element from SelectedIndexChanged or CurrentItemChanged or any such methods.

Any help please ?


Thank you
Ervis  
Plamen
Telerik team
 answered on 20 Dec 2012
8 answers
191 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
120 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
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
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
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?