Hi..
I have created xamdatagrid with some data.
it has 10 rows and 10 colums.
Now i want to enable cells only from column 4 to 7 for a perticular record.
I want to do like this for every record which series of cells i want to enable means it wil enable.
remaining cells should be disabled.
Can u suggest answer for this.
And one more thing.Xamfeature browser examples are helpful.
But in that c# code you are using Strings class.
What is that class..what are that properties..
If i try to use tat program individually means in xaml code u have used that Strings class properties.
How to use that Strings class in our project.??
Thank u very much.
Arron et al,
I am struggling with a simlar thread to the above. My final goal is to IsEnabled = false a single cell on the grid. This is based on the value from another column. All is working except the disable a single cell part. No matter what I've tried (below), the CellValuePresenter comes back null or sets all of the cells for that field to IsEnabled = true.
1. Why is the cvp always null when the record is valid and has content?
2. Why do all of the records in the field become disabled when I am clearly (or not) targeting just one?
The code below works to comments just the items in my group, but the problem is this code disables the entire row, not simply the cell I want to disable. Everything else I have commented below has been tried but does not work.
Thanks,
Glenn
foreach (Infragistics.Windows.DataPresenter.Record rec in gbr) { if (!rec.IsExpanded && rec.Description.StartsWith("RTO-R")) { rec.IsExpanded = true; var children = rec.ViewableChildRecords.ToList(); int totalNumRecs = children.Count;
foreach (DataRecord child in children) { //DataRecord currentRow = child as DataRecord; //CellValuePresenter cvp = CellValuePresenter.FromRecordAndField(child, child.FieldLayout.Fields[8]); //CellValuePresenter cvp = CellValuePresenter.FromCell(child.Cells[8]); //CellValuePresenter cvp = CellValuePresenter.FromRecordAndField(child, child.FieldLayout.Fields[8]); //cvp.IsEnabled = false;
((Infragistics.Windows.DataPresenter.Cell)(child.Cells.Record.Cells.Record.Cells[8])).Record.IsEnabled = false;
//CellValuePresenter cvp = child.DataPresenter.ActiveRecord.FieldLayout.Fields[8] as CellValuePresenter; //cvp.Record.Cells[8].Field.Settings.AllowEdit = false; //Record cvpRecord = cvp.Record; //cvpRecord.IsEnabled = false; //currentRow.Cells[8].Record.Cells[8].Field.Settings.AllowEdit = false; //child.FieldLayout.Fields[8].Settings.AllowEdit = false; }
} }
Hi GDU,
You can find a lot of information from the XamDataGrid documentation. I tend to peruse the API Overview for more specific information.
Hope that helps!
Thanks for ur reply.
xamfeaturebrowser will explain all the concepts at a time..when we run the application.
Is there any other resource which will explain individual concept wise of this xamdatagrid
for beginners..Because of this Strins.resx class i am unable to individual programs..
But overall explanation it is very fine..
Can u suggest any other resource for this..
Hi,
I'm attaching a sample project that shows how you can achieve that using style of the editor.
About your question regarding Strings.resx file it's used for storing some string resources which is used in our Feature Browser Application but they are declared in an external assembly. I suspect the error comes from the Visual Studio which is unable to find them.
Regards
Vlad
Hello Zagorski..
Thanks for ur quick reply.
This one works fine.But i want to disable not only one cell.
Want to disable cells from 2 to 6 of that perticular record. and i want to apply some background
color to those disabled cells.
And about xamfeature browser what is the importance of Strings.resx file.
in that file u r declaring name value and comment..
you are using this strings.resx in every xaml page..
we try to use this strings.resx in our programs..but it gives error..
Because we are new to wpf and this xamdatagrid..
Can u clarify my doubt..
Thank u very much,,