This is a migrated thread and some comments may be shown as answers.

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

1 Answer 137 Views
ListView
This is a migrated thread and some comments may be shown as answers.
완주
Top achievements
Rank 1
완주 asked on 21 Oct 2015, 07:35 AM

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!!

 

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Oct 2015, 01:30 PM
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
Tags
ListView
Asked by
완주
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or