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

[Solved] Column visibility on Edit mode

1 Answer 167 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mahesh Mitkari
Top achievements
Rank 2
Mahesh Mitkari asked on 26 Feb 2011, 08:20 PM
HI

I am using Silverlight RadGridView Control which is binded to a Collection. I am using edit mode of cell/row which allow me to edit the content. I have a Column named "XYZ" which i want to make visible only when GridView is in Edit mode. so that user can edit content of that column also, in normal mode i want to hide that column from user.

i am handling this as follows.
by default i kept the visibility of that Column False.
on Beginningedit method i wrote code like this., to make that column visible.

private void RadGridView1_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
  
            this.RadGridView1.Columns["XYZ"].IsVisible = true;
              
              
        }
and on RowEditEnded I wrote following code
private void RadGridView1_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
{
            //some code here to save changes to backend
  
             this.RadGridView1.Columns["XYZ"].IsVisible = false;
}

this works somewhat fine but have following issues

when user enter into row edit mode the this XYZ column appears as blank, with no data in any cell except the Row which user is editing with NO column header, filter icon on it, it

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 28 Feb 2011, 09:32 AM
Hello Mahesh Mitkari,

I have tested the scenario you described, but everything works as expected on my side. I am sending you the sample project I used for reproducing the issue. Please take a look at it and let me know in case of any misunderstandings.
 

Best wishes,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Mahesh Mitkari
Top achievements
Rank 2
Answers by
Maya
Telerik team
Share this question
or