can not move RowIndicator

6 posts, 0 answers
  1. Chirag
    Chirag avatar
    37 posts
    Member since:
    May 2011

    Posted 12 Apr 2012 Link to this post

    hi to all
    i have a telerik silverlight  Gridview  it's  bind with a source
    i am select 5th row of gridview  but RowIndicator is not moved  it's sticy to 1st row Please see in Attached image fille

    <telerik:RadGridView x:Name="FormsGrid"  CanUserFreezeColumns="False" MinHeight="25"  SelectionMode="Single" 
       AutoGenerateColumns="False"   ScrollMode="RealTime"  RowIndicatorVisibility="Visible"
       BorderThickness="1,6,1,1" telerik:StyleManager.Theme="Office_Blue"
       ScrollViewer.HorizontalScrollBarVisibility="Visible"                                                 
       ScrollViewer.VerticalScrollBarVisibility="Auto"  ShowGroupPanel="True" SelectionChanged="FormsGrid_SelectionChanged"                                              
       CanUserDeleteRows="False" CanUserInsertRows="False" Sorting="FormsGrid_Sorting" Grouped="FormsGrid_Groupe
    </telerik:RadGridView>
  2. Nikhil
    Nikhil avatar
    4 posts
    Member since:
    Jun 2012

    Posted 19 Jun 2012 Link to this post

    I have the same issue. Did you find a solution for this?
  3. Gopala
    Gopala avatar
    28 posts
    Member since:
    Jul 2012

    Posted 26 Jun 2012 Link to this post

    I also have same issue. I found that when you keep SelectionUnit=FullRow then it moves. My problem is I want SelectionUnit= Cell. Did you found the solution for this.
  4. Nikhil
    Nikhil avatar
    4 posts
    Member since:
    Jun 2012

    Posted 26 Jun 2012 Link to this post

    Hi,

    I was able to achieve this by handling the 'CellLoaded' event for the RadGridView control. Here is the event handler pseudo code:

    private

     

     

    void GridView_CellLoaded(object sender, Telerik.Windows.Controls.GridView.CellEventArgs e)

     

    {

     

     

    RadGridView gridView = sender as RadGridView;

     

    // Iterate through gridView.Items

     

    // Determine if the item is for the new row being added to the gridview 
    // The following line will ensure the RowIndicator is moved to the newly added row.

     

    // Set gridView.SelectedItem = item;
    }

    I don't think the RadGridView allows to change the SelectionMode by cell. The only 3 values for it are Extended, Multiple and Single which is for single/multiple selection primarily.

    Hope this helps.

  5. Gopala
    Gopala avatar
    28 posts
    Member since:
    Jul 2012

    Posted 26 Jun 2012 Link to this post

    Hi Nikhil,

    Thanks for your reply. But in my case I donot want to select any row when grid is loaded for first time and shown to user. The user will select the row by clicking row indicator and at same time I also want user to select Cells. I am more interested in giving selectionunit = both i.e., when user clicks rowindicator entire row must be selected and rowindicator must move to that row and when user selects a cell only that cell must be selected not entire row. I was hoping you solved this issue.

    Your pseudo code seems like to set the newly added row as the selecteditem.
  6. Nikhil
    Nikhil avatar
    4 posts
    Member since:
    Jun 2012

    Posted 26 Jun 2012 Link to this post

    Hello Gopala,

    The 'SelectionUnit' property can be set on the control itself (in the XAML file). Maybe that will solve your issue.

    If that does not work, there are other events like 'SelectedCellsChanged' and 'SelectedCellsChanging'. You may want to try handling one of these events and setting the SelectionUnit in the handler for that.

    My pseudocode showed solution for moving the row indicator to a newly added row only.
    Good luck.

    Nikhil

Back to Top