corelibraries-devexpress-dot-data-dot-wcflinq-dot-wcfinstantfeedbacksource.md
Occurs when the WcfInstantFeedbackSource needs a queryable source, to retrieve objects from the WCF data service.
Namespace : DevExpress.Data.WcfLinq
Assembly : DevExpress.Data.v25.2.dll
NuGet Package : DevExpress.Data
public event EventHandler<GetSourceEventArgs> GetSource
Public Event GetSource As EventHandler(Of GetSourceEventArgs)
The GetSource event's data class is GetSourceEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| AreSourceRowsThreadSafe | Specifies whether elements retrieved by the WcfInstantFeedbackSource‘s queryable source are thread-safe. |
| Extender | This property is intended for internal use. |
| KeyExpression | Gets or sets the name of the key property. |
| Query | Specifies the query request to the WCF data service. |
| Tag | Gets or sets an arbitrary object associated with a queryable source. |
Handle this event, to supply a queryable source connected to the required WCF data service. The GetSourceEventArgs class exposes the GetSourceEventArgs.Tag property, which you can use to specify an arbitrary object. This object will be passed along with the GetSourceEventArgs.Query property to the WcfInstantFeedbackSource.DismissSource event handler.
public partial class Form1 : Form {
private void Form1_Load(object sender, EventArgs e) {
wcfInstantFeedbackSource1.KeyExpression = "CustomerID";
wcfInstantFeedbackSource1.GetQueryable += wcfInstantFeedbackSource1_GetSource;
gridControl1.DataSource = wcfInstantFeedbackSource1;
}
void wcfInstantFeedbackSource1_GetSource(object sender, GetSourceEventArgs e) {
// DataServiceContext myDataServiceContext = ...
e.Query = myDataServiceContext.Customers;
}
}
Partial Public Class Form1
Inherits Form
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
wcfInstantFeedbackSource1.KeyExpression = "CustomerID"
AddHandler wcfInstantFeedbackSource1.GetQueryable, AddressOf wcfInstantFeedbackSource1_GetSource
gridControl1.DataSource = wcfInstantFeedbackSource1
End Sub
Private Sub wcfInstantFeedbackSource1_GetSource(ByVal sender As Object, ByVal e As GetSourceEventArgs)
' DataServiceContext myDataServiceContext = ...
e.Query = myDataServiceContext.Customers
End Sub
End Class
See Also
WcfInstantFeedbackSource Class