AutoComplete for ASP.NET Web Forms
AddScriptObject(String,Object) メソッド
使用例 

C1.C1Report.4 アセンブリ > C1.C1Report 名前空間 > C1Report クラス > AddScriptObject メソッド : AddScriptObject(String,Object) メソッド
Name of the new object (case-insensitive).
Value of the new object.
Adds an object to the report's script context.
シンタックス
'宣言
 
Public Overloads Sub AddScriptObject( _
   ByVal name As System.String, _
   ByVal value As System.Object _
) 
public void AddScriptObject( 
   System.string name,
   System.object value
)

パラメータ

name
Name of the new object (case-insensitive).
value
Value of the new object.
解説

This method allows you to add custom objects to the context of the C1Report script interpreter.

The script interpreter context is cleared whenever a report starts rendering, so this method should always be called from the StartReport event handler.

使用例

The code below uses the StartReport event to add a variable called "mainForm" to the script context. It then attaches some script to the report's OnOpen event to show the caption of the form when the report starts rendering.

private void _c1r_StartReport(object sender, System.EventArgs e)
{
    _c1r.AddScriptObject("mainForm", this);
}
private void button1_Click(object sender, System.EventArgs e)
{
    _c1r.OnOpen = "msgbox(mainForm.Text)";
    _c1r.Render();
}
参照

C1Report クラス
C1Report メンバ
オーバーロード一覧