This is a migrated thread and some comments may be shown as answers.

Fill In a Series of Formulas

3 Answers 65 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
jafar
Top achievements
Rank 1
jafar asked on 30 Mar 2013, 12:04 PM
Hello,
I need Fill In a Series of Formulas in cellselection .
for example :
 
 this.radSpreadsheet.ActiveWorksheet.Cells[0, 1].SetValue("=A2");
 this.radSpreadsheet.ActiveWorksheet.Cells[0, 2].SetValue("=B2");
 CellSelection selectionA1A6 = this.radSpreadsheet.ActiveWorksheet.Cells[new CellRange(new CellIndex(0, 1), new CellIndex(0, 7))];

selectionA1A6.FillData(CellOrientation.Horizontal);

and in result I want to have : 

=A2  | =B2 | =C2 | =D2 |...

for per column generate a formula.
but in this version just repeat =A1 | =B2 | ... .

Do you have a solution for this problem?
Thanks

3 Answers, 1 is accepted

Sort by
0
Nikolay Demirev
Telerik team
answered on 01 Apr 2013, 08:43 AM
Hi Jafar,

 You just have to use FillDataSeriesAuto instead of FillData. Here is an example:

this.radSpreadsheet.ActiveWorksheet.Cells[0, 1].SetValue("=A2");
this.radSpreadsheet.ActiveWorksheet.Cells[0, 2].SetValue("=B2");
CellSelection selectionA1A6 = this.radSpreadsheet.ActiveWorksheet.Cells[new CellRange(new CellIndex(0, 1), new CellIndex(0, 7))];
 
selectionA1A6.FillDataSeriesAuto(CellOrientation.Horizontal, true);


Greetings,
Nikolay Demirev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
jafar
Top achievements
Rank 1
answered on 06 Apr 2013, 05:27 AM
Hello
this code repeat =A2 | =B2 formula in other columns 
but I want to set other columns to  C2 | D2 | ... . 
I need Fill In a Series of Formulas in cellselection according to column names.

can you help me?
Thanks

0
Nikolay Demirev
Telerik team
answered on 08 Apr 2013, 11:08 AM
Hello Jafar,

This issue is fixed in the Q1 2013 SP1 version of RadControls for Silverlight and works in the way you explained. I suggest you update your binaries to the latest version and use the code I sent earlier.

Kind regards,
Nikolay Demirev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Spreadsheet
Asked by
jafar
Top achievements
Rank 1
Answers by
Nikolay Demirev
Telerik team
jafar
Top achievements
Rank 1
Share this question
or