Hi,
In the xamgrid i have a template column , i need to make it readonly when i click particular button . Template column should be readonly when i click the button . Other than it should be editable .
Thank YOu
JeevanVinay
Hello Jeevan,
Thank you for your post.
I have been looking into it and what I can suggest is to handle the click event of button and in the event handler you can access the column by its Key and get the ColumnBase objet. You should cast it to the EditableColumn and set it`s IsReadOnly property to True or False. The following code snippet illustrate this functionality:
private void Button_Click(object sender, RoutedEventArgs e)
{
EditableColumn column = xamGrid1.Columns["Key"] as EditableColumn;
if (column != null)
If(column.IsReadOnly == false)
column.IsReadOnly = true;
else
column.IsReadOnly = false;
}
Please let me know if you need any further assistance on the matter.