Select column in radgridview

7 posts, 0 answers
  1. Kevin Tran
    Kevin Tran avatar
    40 posts
    Member since:
    Apr 2010

    Posted 11 Jun 2010 Link to this post

    Hi support,
    I have a requirement in which i have to display a check box in grid , which is multi selectable , There is a button outside grid, In that button click i have to get all the checked columns id, and have to send these ids to another .aspx page as querystring.

    For this i have taken a select column , as there is no data binding property for select column, i am unable to bind any id for that.

    Can i access invisible column in radgridview. How can i pass parameters to the javascript function from code behind to .aspx javascript function.

       <telerikGridView:GridViewSelectColumn  Header="ATU Name" FooterTextAlignment="Left" IsReorderable="False" IsFilterable="False"  > 
     
                            </telerikGridView:GridViewSelectColumn> 
                            <telerikGridView:GridViewDataColumn  UniqueName="id" FooterTextAlignment="Left" IsReorderable="False" IsVisible="False" IsFilterable="False"  DataMemberBinding="{Binding id}"
     
                            </telerikGridView:GridViewDataColumn> 

      private void btnMulticheck_Click(object sender, RoutedEventArgs e) 
            { 
                List<int> checkedRows = new List<int>(); 
     
                
                var rows = this.gvData.ChildrenOfType<GridViewRow>(); 
     
                foreach (var row in rows) 
                { 
                    if (row is GridViewNewRow) 
                        continue
     
                    var checkbox = row.Cells[0]; 
                    var id = row.Cells[1]; 
     
     
                    CheckBox cb = (CheckBox)((System.Windows.Controls.ContentControl)(checkbox)).Content; 
     
                    if (cb.IsChecked == true)  
                    { 
                        checkedRows.Add((int)((Telerik.Windows.Controls.GridView.GridViewCell)(id)).Value); 
                    } 
     
                    HtmlPage.Window.Invoke("SayHello"); 
                   
                } 
     
             
            } 

    Can you suggest me some alternative as i cant show id column to user, And what happens if user scrolls after selecting? Can i access those selected check boxes?
    I am using silverlight Q1 2010 10.1.3.9 version,Is it fully tested version,? Why so many events are not accessible in this version.
    Is there any documentation available for this version

    Thanks

  2. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 11 Jun 2010 Link to this post

    Hi Kevin Tran,

     Do you mean that you wish to get the rows in which the CheckBox in the Select column is checked?

    Best wishes,
    Yavor Georgiev
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rakesh
    Rakesh avatar
    5 posts
    Member since:
    Jul 2010

    Posted 20 Dec 2010 Link to this post

    Hello,

    I need the same thing, I want to bind the GridViewSelectColumn to a database datatable so that the rows are according to the value of the datatable.
    Please provide some code for it.

    Thanks.
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Dec 2010 Link to this post

    Hi,

     GridViewSelectColumn is already bound to the row IsSelected property in order to select rows. 

    Kind regards,
    Vlad
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Rakesh
    Rakesh avatar
    5 posts
    Member since:
    Jul 2010

    Posted 20 Dec 2010 Link to this post

    Sorry I could not explain you the thing properly, Let me try It again....In my radgrid the their are two colums which are binded to a database table one column have checkbox status and other column contain some data. I want that when user selects a row by checking checkbox the status of the database table for that row('Checked') changes. 
    After Selecting the row, when I check the table.GetChages() for the table which is binded to the radgrid shows null;
    that is when I select a row the, binded table is not updating it's status. For other columns I can use DataMemberBinding property but what to use for GridViewSelectionColumn, I also tried using Selector.IsSelected to bind the corresponding column of database table, but it is not working. Please provide me some code for that.

    thanks.
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Dec 2010 Link to this post

    Hi,

     You should use GridViewCheckBoxColumn for editing purposes. GridViewSelectionColumn is for selection not for editing and it is tightly coupled with RadGridView.  

    All the best,
    Vlad
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  8. Makarand
    Makarand avatar
    11 posts
    Member since:
    Oct 2011

    Posted 11 Nov 2011 Link to this post

    can u give us an example for GridViewCheckBoxColumn..
    how to i get multiple checkbox selection in radgridview.
Back to Top
UI for WPF is Visual Studio 2017 Ready