New to Telerik UI for WPFStart a free 30-day trial

Represents the context passed to the prompt request event, carrying the user prompt, the AI request/response payloads, and state about any processing errors.

Definition

Namespace:Telerik.Windows.Controls.Spreadsheet.AI

Assembly:Telerik.Windows.Controls.Spreadsheet.dll

Syntax:

C#
public class SpreadsheetPromptRequestEventArgs : EventArgs

Inheritance: objectEventArgsSpreadsheetPromptRequestEventArgs

Inherited Members EventArgs.Empty

Constructors

Initializes a new instance of the SpreadsheetPromptRequestEventArgs class.

C#
public SpreadsheetPromptRequestEventArgs(string prompt, Action<string> responseSet = null, Action<bool> hasErrorSet = null)
Parameters:promptstring

The prompt text from the user.

responseSetAction<string>

Optional callback invoked when the ResponseText property is set.

hasErrorSetAction<bool>

Optional callback invoked when the HasError property is set.

Properties

Gets or sets a value indicating whether an error occurred during processing. Setting this property triggers the callback.

C#
public bool HasError { get; set; }

Gets the prompt text from the user.

C#
public string Prompt { get; }

Gets or sets the context information about the current spreadsheet state, such as active sheet cell values, to provide to the AI model.

C#
public string RequestContext { get; set; }

Gets or sets the response text from the AI model. Setting this property triggers the callback.

C#
public string ResponseText { get; set; }