multiple cell selection read/write

2 posts, 0 answers
  1. Sri
    Sri avatar
    1 posts
    Member since:
    Sep 2011

    Posted 07 Oct 2011 Link to this post


    Need help with radgridview control.

    I need to select multiple cells in the radgridview and need to update those selected cells values in the database.

    Detailed Explanation:

    Please find my screenshot as attached.You can see my multiple cell selection in the radgridview and outside the radgridview I have a RadComboBox and a Radbutton(named as check).

    1.First I need to select the multiple cells in the radgridview.
    2.When I select the multiple cells and choose the value in RadComboBox (lets say 6 ,as appear in the screenshot) and click the check button,the all selected cells should be updated to '6' and save in the database.
    3.where ever I select the multiple cells and select the value in the combobox and check the button I need to update those cells with that particular value in the database.

    plz find the screen short and the sample project.

    Let me know if you have any questions ? please help me with this..Appreciate your help.

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 12 Oct 2011 Link to this post

    Hi Sri,

     As I understand you would like to select multiple cells. Then select  value with which these cells to be updated. Then click on a 'Check' RadButton click and update the cells with the new value.

    This could be done like so:

    private void Check_Click(object sender, RoutedEventArgs e)
               foreach (GridViewCellInfo cellInfo in clubsGrid.SelectedCells)
                   Club item = cellInfo.Item as Club;
                   // set the value from the combo box, 8 in this case
                   item.StadiumCapacity = 8;
         // update the item in the Database

    Is this what are you looking for? 
    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top