I am binding a dataset to the xamdatagrid.
Here is what my code looks like
<igDP:XamDataGrid Name=" xamDataGrid1" GroupByAreaLocation="None">
</igDP:XamDataGrid>
DataSet AttDS = new DataSet();
DataTable attTable = AttDS.Tables.Add();
//-- Add columns to the data table
attTable.Columns.Add("Header1", typeof(bool));
attTable.Columns.Add("ID", typeof(string));
attTable.Columns.Add("Comments", typeof(string));
//-- Add rows to the data table
attTable.Rows.Add(true, "0002", "Jane Doe - xxxxxxxxxxxxxxxxxxx");
attTable.Rows.Add(false, "0003", "John Dant - yyyyyyyyyyyyyyyyyyy");
attTable.Rows.Add(true, "0004", "Jack Spencer - zzzzzzzzzzzzzzzzz");
attTable.Rows.Add(true, "0005", "Jackie Boyle - zzzzzzzzzzzzzzzzzz");
attTable.Rows.Add(false, "0006", "Susan Thomas - ababababababababa");
if (AttDS.Tables[0] != null)
this.xamDataGrid1.DataSource = AttDS.Tables[0].DefaultView;
In the column, “Comments, I would like to display an image button which when clicked shows the comments.
Thanks
Hello,
For this, you would have to retemplate the CellValuePresenter and add a button inside it. When this button is clicked, you can hide it so that the text appears, or you can show another element. The default styles for the CellValuePresenter you can see in the DefaultStyles directory in the Infragistics folder. The modified control template and style you can apply at the Comments Field's Settings.CellValuePresenterStyle property.