i don't want selection rectangle that i select item(using fullrowselect)

2 posts, 0 answers
  1. 완주
    완주 avatar
    1 posts
    Member since:
    Oct 2015

    Posted 21 Oct 2015 Link to this post

    Thank you

    first question

    i don't want selected rectangle that i select item(using fullrowselect)

    please see a picture

     

    second question

    i want that header isn't clicked

    how can i do??  thanks!!

     

     

  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 21 Oct 2015 Link to this post

    Hello,

    Thank you for writing.

    In ListViewType.DetailsView, the current cell has a border applied. In order to hide it, you can use the CellFormatting event and set the ListViewCellFormattingEventArgs.CellElement.DrawBorder property to false for the current cell:
    private void radListView1_CellFormatting(object sender,
        Telerik.WinControls.UI.ListViewCellFormattingEventArgs e)
    {
        if (e.CellElement.Data.Current )
        {
            e.CellElement.DrawBorder = false;
        }
    }

    As to the second question, I suppose that you are trying to remove the hover and pressed style for the header cells. To achieve it, you can again use the CellFormatting event  to disable the cell fill and apply a single border:
    private void radListView1_CellFormatting(object sender,
        Telerik.WinControls.UI.ListViewCellFormattingEventArgs e)
    {
        if (e.CellElement is DetailListViewHeaderCellElement)
        {
            e.CellElement.DrawFill = false;
            e.CellElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder;
        }
        else
        {
            e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinContro
            e.CellElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, Telerik.Win
        }
    }

    If it is not the exact requirement please specify in details what is the goal that you are trying to achieve. Thus, we would be able to assist you further. Thank you in advance.

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top