Quantcast
Channel: Our ComponentOne » All Posts
Viewing all 14170 articles
Browse latest View live

Cell content spills into neighbour cell since 2017v1 update

$
0
0

After upgrading to Version 2.0.20171.248 we found that the behaviour of flexgrid for windows has changed:

Now by default cell content that is to large to fit in a cell spills into the next cell to the right. This creates unwanted and ugly effects (see picture attached).

In earler versions the text was truncated at the end of the cell, this would be the desired behaviour.

We would need an urgent fix for that.


Reply To: View Dynamic FlexReport in MVC Viewer

$
0
0

Hi Ryan

Use case is that we are looking to dynamically generate the report and data model in the controller itself.

So the ReportViewer HTMLHelper should also be able to take in a C1FlexReport object as input.

Or, is there a way to get hold of the controller object in MemoryReportsProvider ?

Best Regards
Abhishek

Custom RecurrenceForm

$
0
0

Hi,
how can i create and handle a custom RecurrenceForm (without the usual "Dim form As RecurrenceForm = New RecurrenceForm(C1Calendario, pattern, isNew)")
I can't find any kinda info about that in the whoile site...
Thanks

Regards,
Fabio La Vitola

C1ComboBox with Masked Edit

$
0
0

Hi,

I'm writing a VB application and using version 4.0.20163.226 of the C1List.C1Combo. I'm filling the combo with a list of phone numbers and I want the user to be able to select from the list or enter a brand new number. I want the ability to add a formatting to the new number, something like the EditMask property on a text box where the format is "000-000-0000".

Can you point me in the right direction?

Thanks in advance,
Deb

Reply To: View Dynamic FlexReport in MVC Viewer

$
0
0

Hi Abhishek,

I understand what you want. Now we don't support it, we will discuss with team members whether it's possible to add a method to accept a C1FlexReport object in HtmlHelper.

Thanks.
Regards,
Ryan

Reply To: How to deselect all cells in C1DataGrid

$
0
0

Hi,

Please resolve some issues in the attached project which was built from the code which you have provided.

~nilay

Reply To: Add Images and Text to InputComboBox

$
0
0

Hi,

Although this is possible theoretically, it is not preferred. I would recommend you to use C1ComboBox which is part of C1Input. If that is not possible refer this code:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        List<Person> Persons = Person.GetRandomList();
        foreach(var person in Persons)
        {
            var opn = new CustomInputOptionHost(person.Image, person.Name);
            _icb.Items.Add(opn);
        }
    }
}

public class CustomInputOptionHost : C1.Win.C1InputPanel.InputControlHost
{
    public CustomInputOptionHost(Image img, string txt)
        : base(new CustomInputOption(img, txt))
    {
        this.Height = 40;
    }

    protected override void OnMouseEnter(EventArgs e)
    {
        base.OnMouseEnter(e);
        this.BackColor = SystemColors.MenuHighlight;
    }

    protected override void OnMouseLeave(EventArgs e)
    {
        base.OnMouseLeave(e);
        this.BackColor = Color.White;
    }
}

public class Person
{
    public string Name { get; set; }

    public Bitmap Image { get; set; }

    internal static List<Person> GetRandomList()
    {
        var Persons = new List<Person>();

        for(int i = 0; i< 100; i++)
        {
            Persons.Add(new Person()
            {
                Name = Guid.NewGuid().ToString(),
                Image = PadImage(new Bitmap(20, 20))
            });
        }

        return Persons;
    }

    internal static Bitmap PadImage(Bitmap originalImage)
    {
        var largestDimension = Math.Max(originalImage.Height, originalImage.Width);
        var squareSize = new Size(largestDimension, largestDimension);
        var squareImage = new Bitmap(squareSize.Width, squareSize.Height);
        using (Graphics graphics = Graphics.FromImage(squareImage))
        {
            graphics.FillRectangle(Brushes.Green, 0, 0, squareSize.Width, squareSize.Height);
            graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
            graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
            graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            graphics.DrawImage(
                originalImage, 
                (squareSize.Width / 2) - (originalImage.Width / 2), 
                (squareSize.Height / 2) - (originalImage.Height / 2), 
                originalImage.Width, 
                originalImage.Height
                );
        }
        return squareImage;
    }
}

public class CustomInputOption : UserControl
{
    #region Component Designer generated code

    /// <summary> 
    /// Required method for Designer support - do not modify 
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        this._pb = new System.Windows.Forms.PictureBox();
        this._lb = new System.Windows.Forms.Label();
        ((System.ComponentModel.ISupportInitialize)(this._pb)).BeginInit();
        this.SuspendLayout();
        // 
        // _pb
        // 
        this._pb.Location = new System.Drawing.Point(0, 0);
        this._pb.Name = "_pb";
        this._pb.Size = new System.Drawing.Size(40, 31);
        this._pb.TabIndex = 0;
        this._pb.TabStop = false;
        this._pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
        // 
        // _lb
        // 
        this._lb.Location = new System.Drawing.Point(41, 0);
        this._lb.Name = "_lb";
        this._lb.Size = new System.Drawing.Size(268, 31);
        this._lb.TabIndex = 1;
        this._lb.Text = "label1";
        this._lb.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
        // 
        // CustomInputOption
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.Controls.Add(this._lb);
        this.Controls.Add(this._pb);
        this.Name = "CustomInputOption";
        this.Size = new System.Drawing.Size(321, 31);
        ((System.ComponentModel.ISupportInitialize)(this._pb)).EndInit();
        this.ResumeLayout(false);

    }

    #endregion

    private System.Windows.Forms.PictureBox _pb;
    private System.Windows.Forms.Label _lb;
    public CustomInputOption()
    {
        InitializeComponent();
    }

    protected override void OnMouseEnter(EventArgs e)
    {
        this.Parent.BackColor = Color.White;
        this.BackColor = SystemColors.Highlight;
    }

    public CustomInputOption(Image image, string text)
    {
        InitializeComponent();
        Text = text;
        Image = image;
    }

    public override string Text
    {
        get
        {
            return _lb.Text;
        }
        set
        {
            _lb.Text = value;
        }
    }

    public Image Image
    {
        get
        {
            return _pb.Image;
        }
        set
        {
            _pb.Image = value;
        }
    }
}

~nilay

Reply To: RibbonItems ReadOnly Property

$
0
0

Hi Fabio,

By View Mode, do you mean Designer mode?

~nilay


Reply To: RibbonItems ReadOnly Property

$
0
0

@nilayvishwkarma said:
Hi Fabio,

By View Mode, do you mean Designer mode?

~nilay

Hi Nilay,
i mean in run time using the same form to - just - show data in "view mode" (can't change data), so the user is only alowed to look at data and copy into clipboard.
If i force components to "Enabled --> false", often data are extremely difficult to read regarding visual style).
So, a general readonly feature into components would be really useful.

Reply To: C1CommandHolder with Ribbon, context menus and toolbars

$
0
0

Hi Wolfgang,

@WolfgangWeh said:
Is this a good idea? Experiences, recommendations?

Theoretically, it is possible to write an adapter between C1Command and C1Ribbon. If multi-level menu-merging work good with C1Ribbon, this use case would work fine with C1CommandHolder. As a container for commands, C1CommandHolder corresponds to a single form. I am not sure how MDI forms come into play here. Also note that, even if you do not add C1CommandHolder manually, it is created behind the scenes automatically to manage C1Command.

@WolfgangWeh said:
Is there an example which shows the combination of all these controls?

I can write an example for you. Give me a few more days. As of now, if you need any suggestion, refer these samples:

http://www.componentone.com/Studio/Pages/Samples/winforms-createmenusincode

http://www.componentone.com/Studio/Pages/Samples/winforms-nonmdimenumerge

http://www.componentone.com/Studio/Pages/Samples/winforms-simplemenusincode

http://www.componentone.com/Studio/Pages/Samples/winforms-banktellerwithcabextensionkit

http://www.componentone.com/Studio/Pages/Samples/winforms-simpletexteditor

http://www.componentone.com/Studio/Pages/Samples/winforms-c1commandbasedapp

http://www.componentone.com/Studio/Pages/Samples/winforms-c1ribbonbasedapp

http://www.componentone.com/Studio/Pages/Samples/winforms-createappmenu

@WolfgangWeh said:
Will all linked UI elements update when properties of the command in the CommandHolder change (Enabled, Checked, Visible, etc..)?

Yes!!
Command holder provides the following features:
- It is also an IExtenderProvider providing a C1ContextMenu property to all controls on the form.
- Provides an idle-time automatic update of commands' status such as visible, enabled, checked...

@WolfgangWeh said:
Is there a way to (semi-)automatically match ribbon groups and context menus?

Theoretically yes. Let me work on this. I would update the same in the sample I am going to follow up with this.

~nilay

Reply To: Flexchart Model

$
0
0

I suppose it would be hard to do this with TagHelpers(limitation). I will confirm.
Maybe we can work out HtmlHelper samples though.
Will update as soon as I have something going.

Reply To: Add Images and Text to InputComboBox

$
0
0

Hi Nilay,

thank you for the reply and the solution.
I tried your solution but it works partially. These are the issues I noticed:
1. I can't select an item in the InputComboBox.
2. An item doesn't get highlighted while pointing at it with the cursor.

I tried to used a C1ComboBox like you proposed. For this purpose I used an InputControlHost which hosts a C1ComboBox. But it doesn't get themed like the InputComboBoxes in my InputPanel.
I have another question. How can I use a C1ComboBox to show Text, Image and Text in this order in each Item? Lets say in my Class Person I have another string Property "Id":


public class Person
{
    public string Id { get; set; }

    public string Name { get; set; }

    public Bitmap Image { get; set; }
}

And i will like to show: Id, Image and Name in each C1ComboBox Item (Please see the attached picture WhatIwantTohave.png). How can I achieve this?

Thanks for the help
Maxime

Reply To: Custom RecurrenceForm

$
0
0

Hi Fabio,

You can change the recurrence pattern of any appointment programatically by using the GetRecurrencePattern method.

c1Schedule1.DataStorage.AppointmentStorage.Appointments(0).GetRecurrencePattern().Duration = New TimeSpan(10, 0, 0, 0)

In the abaove code we have modified the duration of recurrence of first appointment. The same way you can modify the other properties as well.

Hope it helps.

Thanks,
Akshay

Reply To: Binding Flexgrid Cell Background

$
0
0

Hi,
thanks for your answer, but when I change value, it not works. The changed value I see, but color is the same)

Any idea?

Reply To: Binding Flexgrid Cell Background

$
0
0

Hi,
It works fine for me.
Based on the below condition(s):
1) Cell's back color is set to Red when cell's value is 1.
2) Otherwise set to Aqua.


                   if (val.Equals(1))
                    {
                        bdr.Background = new SolidColorBrush(Colors.Red);
                    }
                    else
                    {
                        bdr.Background = new SolidColorBrush(Colors.Aqua);
                    }

You can change this value accordingly. If this does not work please share a small sample application with us so that we can assist you accordingly.

Thanks,
Sonu


HELP - Scheduler time bar does not scroll with section

$
0
0

Hi,

Using the scheduler control on Work Week mode.

On the scheduler control, the work week area scrolls separate from the time bar. As a result, once you have scrolled through on the work week area, you have no idea what time are you currently see.

Seems like a deal breaker to me.
Am I missing something?

Reply To: HELP - Scheduler time bar does not scroll with section

Reply To: HELP - Scheduler time bar does not scroll with section

$
0
0

Happens in the exact same manner even in your sample.
All you need to do is go to the scheduler page, shift to work week, and then scroll inside of the work area. The time bar will remain in the same place.

Please check and suggest if something can be done.

@C1_IrinaP said:
can you reproduce it with our samples from Windows Store https://www.microsoft.com/en-us/store/p/componentone-studio-uwp-edition/9nblggh6cd9j?
If not, we need to know what exact version of control you use and simple sample reproducing the problem.

Reply To: RibbonItems ReadOnly Property

$
0
0

Hi Fabio,

That seems useful.

Just so we are on the same page, you need a ReadOnly property which would not change the 'look' of the control but only disable changing its value. Correct?

~nilay

Reply To: Add Images and Text to InputComboBox

Viewing all 14170 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>