Telerik Forums
UI for WPF Forum
0 answers
58 views
Hello, I am using Radspreadsheet for WPF. I need once I import data, I attach checkbox at the last column in each row.
This is what I have done so far:

            
    int rowCount = importxls.ActiveWorksheet.UsedCellRange.RowCount;
                int lastcolumn = importxls.ActiveWorksheet.UsedCellRange.ColumnCount;

                MessageBoxResult result = MessageBox.Show(rowCount.ToString());

                // Create a new checkbox and set its properties
                CheckBox checkbox = new CheckBox();
                checkbox.IsChecked = true;
                checkbox.VerticalAlignment = VerticalAlignment.Center;
                checkbox.Margin = new Thickness(5, 0, 0, 0);

                DependencyProperty chkBox = DependencyProperty.Register(
                      "Select", typeof(bool), typeof(CheckBox),
                      new UIPropertyMetadata(checkbox.IsChecked));

                for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
                {
                    
                    // Add the checkbox to the current row
                    RowSelection rowSelection = importxls.ActiveWorksheet.Rows[rowIndex];
                    CellIndex cellIndex = new CellIndex(rowIndex, lastcolumn);
                    CellSelection cellSelection = rowSelection.Worksheet.Cells[cellIndex];

                    cellSelection.SetValue(DateTime.Now); //checkbox should be here

                }


Where am I supposed to modify?
Cheruiyot
Top achievements
Rank 1
 asked on 27 Mar 2023
1 answer
159 views

When ShowGroupHeaderRowAggregates is left as True, the header aggregates are not appearing above the appropriate cells upon exporting to Excel (ExportToXlsx), but rather all scrunched together and an utterly useless mess. The RadGridView on the client looks correct as the following is set: ColumnAggregatesAlignment="NextToGroupKey" in the XAML.

What do we need to do to properly align the aggregate columns in the header for the Excel export functionality? Are there any solid examples of how to do this?

Thank you.

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Oct 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?