VIBlend

Using Appointments with VIBlend SuperMonthCalendar for Windows Forms

by viblend 31. August 2009 12:00
Sometimes we need to mark a special day such as a business meeting, birthday, etc. on our calendar. You can do this very easily using SuperMonthCalendar. Just create a new instance of the SuperAppointment class and add it to the Appointments collection of SuperMonthCalendar.

    SuperAppointment appointment = new SuperAppointment();

    appointment.Date = DateTime.Now.Date.AddDays(1);           

    this.superMonthCalendar1.Appointments.Add(appointment);

    this.superMonthCalendar1.CurrentDate = DateTime.Now.Date;

You can also add a recurrence pattern to the appointment using the RecurrenceRule property. Here we specify that our appointment has a daily recurrence pattern and It should appear once for a three days.

    appointment.RecurrenceRule = RecurrenceRule.Daily;

    appointment.DayPattern.DaysToNextOccurence = 3;


You can assign a SuperTooltip control to an appointment using its SuperToolTip property.

 

    SuperToolTip toolTip = new SuperToolTip();

    appointment.SuperToolTip = toolTip;

 
We hope you will enjoy using VIBlend SuperMonthCalendar.

Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

VIBlend SuperControls for WinForms | calendar control

New RibbonBar Control for Windows Forms

by viblend 25. April 2009 19:40

We recently added a ribbon bar control to our components suite. One of the cool and unique features is that it supports Windows7 Scenic look and feel besides the standard Office2007 styles. You can change the style of the RibbonBar control by setting the RibbonStyle property.

Windows7 style Ribbon

You can find more about SuperRibbonBar at the Winforms Ribbon interface product page:

http://www.viblend.com/products/net/windows-forms/controls/ribbonbar.aspx
 

Currently rated 4.0 by 2 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

VIBlend SuperControls for WinForms

Introducing Office 2007 style Conditional Formatting in SuperGridView

by viblend 25. August 2008 16:35

With the release of version 1.3, there's no doubt that SuperGridView has the most robust and flexible conditional formatting capabilities when compared to other .NET grid controls on the market. It also looks cool as you can see from the screenshot below.


hierarchical grid with conditional formatting

Here's the simple question: How hard is it implement this?

Well, SuperGridView makes it very very easy. Let's go through the process.

In order, to apply conditional formatting with color scales we must define a group of cells and associate with a specific color scale. This normally takes three easy steps.

Step 1. Enable Conditional Formatting and Create the Conditional Formatting group 

SuperGridView has a class which wraps this entire functionality. The class is defined within the DataFieldArea of the grid and it's name is ConditionalFormattingGroup. You can use it in the following way:

     grid.DataFieldArea.ConditionalFormattingEnabled = true;

     DataFieldArea.ConditionalFormattingGroup cfGroup = new DataFieldArea.ConditionalFormattingGroup();

     cfGroup.SetConditionalFormattingColorScale(GridCellCFColorScale.GREEN_TO_RED);

The SetConditionalFormattingColorScale method allows you to select one of the built-in color scales. If you prefer to create your own you can use the SetCustomConditionalFormattingColorScale method which simply takes an array of one hundered colors which define the scale.

Step 2. Add the group to the grid's DataFieldArea and assign in a name

This is just a single line of code which basically says: "Hey, SuperGridView, this is my ConditionalFormattingGroup and for you this is its name"

     grid.DataFieldArea.ConditionalFormattingGroups.Add("mygroup", cfGroup);

Step 3. Assign grid cells to the conditional formatting group

SuperGridView allows you to add individual cells to a group, as well as entire rows and columns. This is done by calling the methods SetCellConditionalFormattingGroup or SetItemConditionalFormattingGroup for individual cells and for columns/rows respectively.

   grid.DataFieldArea.SetCellConditionalFormattingGroup(gridCell, "mygroup");

   grid.DataFieldArea.SetItemConditionalFormattingGroup(rowItem, "mygroup");

The following code will create a new conditional formatting group and fill it with a the selected cells:

   private void buttonConditionalFormatSelectedCells_Click(object sender, EventArgs e)
   {
        grid.DataFieldArea.ConditionalFormattingGroups.Clear();

        DataFieldArea.ConditionalFormattingGroup cfGroup = new DataFieldArea.ConditionalFormattingGroup();
        cfGroup.SetConditionalFormattingColorScale(GridCellCFColorScale.GREEN_TO_RED);

        grid.DataFieldArea.ConditionalFormattingGroups.Add("mygroup", cfGroup); 

        foreach (GridCell cell in grid.DataFieldArea.SelectedCells)
        {
             grid.DataFieldArea.SetCellConditionalFormattingGroup(cell, "mygroup"); 
         }
   }



Currently rated 4.0 by 5 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

GridView | VIBlend SuperControls for WinForms

About the author

Some text that describes me

Recent comments

None

Copyright © 2009 VIBlend  
ALL RIGHTS RESERVED  
 
Terms of Use | Privacy Policy
WinForms Controls Purchase Online About Us
       
DataGrid Navigation Pane Technical Support Blog
ScrollBar TreeView
ListBox ProgressBar Downloads Register
ComboBox Buttons
TabControl Editors Documentation Client Login

VIBlend Blog is powered by BlogEngine.NET