XamDataGrid in my application contains embedded Images, Checkboxes. After Printing the images disappears. If the XamDataGrid is scrolled to the bottom & restored to the origianl position, then the images & checkboxes re-appears. Also, if another tab is selected and switched back to the previous tab, then the images & checkboxes are restored.
Printing:
Report reportObj = new Report(); EmbeddedVisualReportSection section = new EmbeddedVisualReportSection((Visual)xamDataGridEditor);
reportObj.Sections.Add(section);
reportObj.Print();
Populating XamDataGrid:
public void PopulateXamDataGrid() { DataSet ds = new DataSet(); DataTable dt = GetDataSource(); xamDataGrid.DataSource = ds.Tables[0].DefaultView; }
private DataTable GetDataSource() { DataTable dt = new DataTable("Test"); dt.Columns.Add("S.No.", typeof(int)); dt.Columns.Add("A", typeof(CheckBox)); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("Employee Code", typeof(string)); for (int i = 0; i < 1000; i++) { DataRow dr = dt.NewRow(); dr["S.No."] = i; CheckBox cbx = new CheckBox(); dr["A"] = cbx; dr["Name"] = "Test " + i + " Name"; dr["Employee Code"] = "Code 2011" + i; dt.Rows.Add(dr); } return dt;
}
Hello Uvitha,
Were you able the setup the checked / unchecked logic?
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
What kind of processing do want to occur when a checkbox is checked / unchecked?
You can add logic to the setter for the boolean field to preform actions when the state of underlying field changes due to a check / uncheck.
Hi Valerie,
Thanks for your support. Now, I am able to view the checkboxes in the XamDatagrid & it does not dissappear after Print.
In our current application, we have embedded checkboxes in the XamDataGrid and also have have handled the "Checkbox Checked" & "Checkbox UnChecked" events. Now, when we are going to assign a bool datatype to the column, then these checkbox events cannot be handled right? Can you kindly confirm on this part or if you have any other alternative suggestions please let me know?
Thanks,
Uvitha
Do you have any other questions on this matter?
Thank you Valerie. The sample appliction is very helpful!