Hi,
I am using Xamdatagrid to display data. There i am able to add new rows.But i am not getting how to add new columns to the existing row.
Here i am taking the data from one static class. Then how to view or activate particular cell of the row to view its details.
Problem is,
Consider my one column cell is contain data 4.
If u click that cell it have to give the information regarding to that cell.
Can u suggest some code.
Thank You!!!
Your best option to do this is to use the Adoring behavior of the XamDataGrid.
You can see an example of that either in the XamFeatureBrowser or in the Josh Smith blog post on the link below:
http://blogs.infragistics.com/blogs/josh_smith/archive/2008/09/12/adorning-xamdatagrid-with-a-popup-editor.aspx
Regards,
Alex.
Thank you for suggestion!!!!!
My problem regarding cell:
If i double click on one particular cell means it has to display information related to that cell taking the data from another class.
Thank you once again!!!!!!!
Hello,
I am not sure I am able to understand all of your requirements. Assuming that you already have some records (rows) and you want to add another field (column) to the XamDataGrid, you should add an unbound field to the FieldLayouts collection like this:
xamDataGrid1.FieldLayouts[0].Fields.Add(new UnboundField(){Name="unb",Label="unbound"});
Can you please give more information about how you want to display more information about the cell and what is this additional information.
About your first requirement you can refer to the following thread in the forums :
http://forums.infragistics.com/forums/p/22309/81355.aspx#81355
You can easily get the value of a cell using the following code :
private void xamDataGrid1_CellActivated (object sender, Infragistics.Windows.DataPresenter.Events.CellActivatedEventArgs e)
{ Cell currentCell = e.Cell; var cellValue = currentCell.Value; }
Hope this helps
Vlad