Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2387
Tweaking the look
posted

there are a number of little tweaks I would like to make to how a WinGrid looks, but I cannot figure out how to do them.  Here is the screen shot of what I have so far:

Here is what I would like to change:

  • Remove the little brown box leading off each row, on band[0] it is between the +/- and Text, on band[1] it is before the 68

Band[0]

  • Keep the # column fixed (it's min/max is set to 24 right now) and make Name expand so that the full width of the control is used.

Band [1]

  • Eliminate any space between band[0], both above and below it.
  • Make it so that it is NOT possible to select band[1]
Parents
No Data
Reply
  • 27093
    Suggested Answer
    posted

    Hello,

    This little boxes are the RowSelectors you can dispatch them with this property: ultraGrid1.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False;

    In order to make Name expand to the full width you can set this:
    ultraGrid1.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns; After which you can set the MIn/MaxWidth of # in order to prevent it from resizing

    You can eliminate the space between the bands with:  ultraGrid1.DisplayLayout.InterBandSpacing = 0;

    There isn't a property that disables the whole band but one way to do this is like so:

    private void ultraGrid1_AfterCellActivate(object sender, EventArgs e)
    {
         if (ultraGrid1.ActiveCell.Band.Index == 1)
         {               
               //ultraGrid1.PerformAction(UltraGridAction.PrevCell);
               //ultraGrid1.ActiveCell = null;
         }
                     
    }

    private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
    {
         if (ultraGrid1.ActiveRow.Band.Index == 1)
         {
               //ultraGrid1.PerformAction(UltraGridAction.PrevRow);
               //ultraGrid1.ActiveRow = null;
         }
    }

    Hope this helps.

    Sincerely,

    Petar Monov

    Developer Support Engineer,

    Infragistics, Inc

    (Verify answer if satisfied)

     

     

     

Children