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

How can I edit the Cell.DataColumn.DataFormatString programmatically by cell and not by column?

1 Answer 66 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Felipe Lucio
Top achievements
Rank 1
Felipe Lucio asked on 11 Mar 2013, 08:18 PM
Please, I am Felipe Lucio Quirino and I`m using a custom RadTreeListView custom control that is almost what I want. 
The problema is that i`m setting the ItemSource of the RadTreeListView, and its cells types and validations are built as the type of the source I was binding to the RadTreeListView, but, I have a column that is an object type and I want to change the cell DataFormatString if possible for datetime, decimal or other type when the application is running.  I did not find a way for doing it. please, help!
I got a project attached in this thread that you could customize, but to try to reprodoce what I want you have to put other property in the File class type defined like an object and when begin editing the RadTreeListView when the app is running , try to set some specific datatype like decimal.

change de extension of the file to .rar.. to extract the project or download by the following link http://www.telerik.com/ClientsFiles/231850_radtreelistviewdraganddropsample-wpf-1.zip

Thanks!



1 Answer, 1 is accepted

Sort by
0
Felipe Lucio
Top achievements
Rank 1
answered on 11 Mar 2013, 08:32 PM
Obs.: I tried to do the following, but i did not work!

just doing the following:
Telerik.Windows.Controls.RadMaskedTextBox txtb = new RadMaskedTextBox();
txtb.Mask = "#9.2";
Telerik.Windows.Controls.GridView.GridViewEditorPresenter esadf = e.EditingElement.Parent as Telerik.Windows.Controls.GridView.GridViewEditorPresenter;
esadf.Content = txtb;

thanks!!
Tags
TreeListView
Asked by
Felipe Lucio
Top achievements
Rank 1
Answers by
Felipe Lucio
Top achievements
Rank 1
Share this question
or