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: Fri, 12 Aug 2005 19:01:11 +1000

    Thanks Sam!
    
    Regards,
    
    Greg
     
    
    
    Dr Greg Low
    Readify - Senior Consultant
    M: +61 419 201 410
    
    
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On
    Behalf Of Sam Lai
    Sent: Friday, 12 August 2005 8:36 AM
    To: dotnet@xxxxxxxxxxx
    Subject: Re: [aus-dotnet] C1 FlexGrid
    
    I think your problem is that you didn't add it into the styles
    collection, i.e. you didn't:
    
    Dim testCellStyle As C1.Win.C1FlexGrid.CellStyle
    
    //key line
    TestFlexGrid.Styles.Add(testCellStyle)
    
    //or instead of the above two lines of code, you can do this:
    Dim testCellStyle As CellStyle = fg.Styles.Add("TestCellStyleName")
    //you have to give it a name for reference purposes which maybe required
    later when you want to retrieve it for editing from the styles
    collection
    
    then later you can do this stuff
    
    testCellStyle = TestFlexGrid.GetCellStyle(somerow,somecolumn)
    
    testCellStyle.ForeColor = Color.Red
    
    TestFlexGrid.SetCellStyle(somerow,somecolumn,testCellStyle)
    
    Hope that helps solve your problems if creating styles at runtime.
    
    Sam
    
    On 8/11/05, Greg Low <greg.low@xxxxxxxxxxx> wrote:
    >  
    > 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,
    >   
    > Thomas Williams
    > http://dotnetjunkies.com/WebLog/thomasswilliams/
    >  
    >  
    >  
    >   
    >   
    > -----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
    > http://dotnetjunkies.com/WebLog/thomasswilliams/
    >  
    >  
    >   
    >   
    >   
    > -----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
    > 
    >   
    > 
    >   
    >
    ---
    [This E-mail scanned for viruses by Declude]
    
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send
    "subscribe dotnet Your Name" in the body of the email to:
    imailsrv@xxxxxxxxxxx List managed by: http://www.stanski.com
    ---
    [This E-mail scanned for viruses by Declude]
    
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send "subscribe dotnet Your Name" in the body of the email to: imailsrv@xxxxxxxxxxx
    List managed by: http://www.stanski.com
    
    



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