RE: [aus-dotnet] C1 FlexGrid


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Greg Low
    • Subject: RE: [aus-dotnet] C1 FlexGrid
    • Date: Thu, 11 Aug 2005 17:31:47 +1000

    Title: Message
    Worked a treat thanks!
     
    Regards,
     
    Greg
     

    Dr Greg Low

    Readify - Senior Consultant

    M: +61 419 201 410

     


    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Greg Low
    Sent: Thursday, 11 August 2005 5:11 PM
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] C1 FlexGrid

    Thanks Thomas. No, the constructor the CellStyle is private. You can't New it. I'll try doing it in the designer and adding it as an extra style. Thanks for the warning on the editing bit too.
     
    It just seems such a dumb object model. You'd think the style of a cell would be a property of the cell, etc. not a method call on the grid itself.
     
    Regards,
     
    Greg
     

    Dr Greg Low

    Readify - Senior Consultant

    M: +61 419 201 410

     


    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Williams, Thomas
    Sent: Thursday, 11 August 2005 5:08 PM
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] C1 FlexGrid

    Hey Greg,
     
    Looks like in your code you didn't "New" the CellStyle (not too sure if you can). I tried many permutations, but the one I got to work "well enough" was to create a custom cell style in the C1 "Styles" dialog at design time ("CustomStyle1"), and then set the cell to have that style with SetCellStyle via code at runtime:
     
    TestFlexGrid.SetCellStyle(somerow, somecolumn, TestFlexGrid.Styles("CustomStyle1"))
     
    This works but watch out that you don't set things like "AllowEditing" and "ComboList" in your new style, they will override the default "Normal" settings.
     
    Cheers,
     
     
     
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Greg Low
    Sent: Thursday, 11 August 2005 16:55
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] C1 FlexGrid
    Hi Thomas,
     
    I spoke too soon. I tried:

    Dim testCellStyle As C1.Win.C1FlexGrid.CellStyle

    then later did

    testCellStyle = TestFlexGrid.GetCellStyle(somerow,somecolumn)

    testCellStyle.ForeColor = Color.Red

    TestFlexGrid.SetCellStyle(somerow,somecolumn,testCellStyle)

    and it whinges at setting the color that the object doesn't exist. The cell at somerow,somecolumn did exist.

    Any thoughts?

    Thanks,

    Greg

     

    Dr Greg Low

    Readify - Senior Consultant

    M: +61 419 201 410

     


    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Greg Low
    Sent: Thursday, 11 August 2005 4:45 PM
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] C1 FlexGrid

    Thanks Thomas! I like using it in examples some times and it's very capable but its object model and I don't see eye to eye.
     
    Regards,
     
    Greg
     

    Dr Greg Low

    Readify - Senior Consultant

    M: +61 419 201 410

     


    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Williams, Thomas
    Sent: Thursday, 11 August 2005 4:39 PM
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] C1 FlexGrid

    Hi Greg,
     
    Short answer - you need to set up a new custom style with the properties you want, then set the cell's style to that (can be done in code using grid.SetCellStyle).
     
    Cheers,
     
    Thomas Williams
     
     
     
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Greg Low
    Sent: Thursday, 11 August 2005 16:33
    To: dotnet@xxxxxxxxxxx
    Subject: [aus-dotnet] C1 FlexGrid
    Hi Folks,
     
    Anyone know how to set the color of a particular cell (either background or foreground) in the componentone flexgrid?
     
    Thanks,
     
    Greg
     

    Dr Greg Low

    Readify - Senior Consultant

     

     

    Unit 206 Nolan Tower,

    29 Rakaia Way

    Docklands  VIC 3008

    M: +61 419 201 410

    F: +61 (3) 9600 1665

    E: greg.low@xxxxxxxxxxx

    W: www.readify.net

     

     

     



    (Click here for more information on the aus-dotnet mailling list)