FullRowSelect disable

4 posts, 1 answers
  1. Thomas
    Thomas avatar
    15 posts
    Member since:
    Oct 2012

    Posted 26 Sep 2014 Link to this post

    Hi,

    I'm trying to disable to fullrowselect in a ListView with detail as its viewtype and thereby only have a one or more cells selected.
    Please see the code below:

    public partial class ListViewFullRowSelect : Form
    {
        public ListViewFullRowSelect()
        {
            InitializeComponent();
            radListView1.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
            radListView1.FullRowSelect = false;
            List<Test> testList = new List<Test>();
     
            Random r = new Random();
     
            for (int i = 0; i < 500; i+=3)
            {
                int nextvalue = r.Next(10)+1;
                testList.Add(new Test(i, i + " times " + nextvalue+ " = " + i * nextvalue));
            }
            radListView1.DataSource = testList;
        }
    }
     
     
    public class Test
    {
        public int id { get; set; }
        public string result { get; set; }
         
        public Test(int id, string name)
        {
            this.id = id;
            this.result = name;
        }
    }


    Is what i'm trying to do possible or does it conflict with the whole idea of listview?

    Regards,
    Thomas
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 01 Oct 2014 Link to this post

    Hello Thomas,

    Thank you for writing.

    In details view you cannot properly see how the FullRowSelect property works. I have recorded a small video to show you the difference. 

    If you want to, you can change the styles in the theme and set different background for the selected cell. This can be achieved by editing the predefined themes in Visual Style Builder. The attached two images are showing you how can switch to detailsview and where to find the appropriate elements that need to be changed. In addition the following articles are very usefull when you need to edit themes:
    1. Using custom themes
    2. Loading Predefined Themes
    3.Working With Repository Items

    Please let me know if there is something else I can help you with. 
     
    Regards, Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Thomas
    Thomas avatar
    15 posts
    Member since:
    Oct 2012

    Posted 07 Oct 2014 Link to this post

    Hi Dimitar,

    Great :DThank you for the clarification.
    In addition, is it possible to multiple "blue" / current cells ?? See attached png.

    Regards,
    Thomas
  5. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 09 Oct 2014 Link to this post

    Hi Thomas,

    Thank you for writing back.

    This is not supported in RadListView. However another approach will be to use RadGridView where you can choose the selection mode and select cells only. For example just setting MultiSelect and SelectionMode properties will allow you to select multiple cells (you must hold the ctrl key as well):
    radGridView1.MultiSelect = true;
    radGridView1.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect;

    I hope this will be useful.

    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top