![]() ![]() ' Since the ErrorProvider control does not have a visible component, ' You set the DataSource to a data set, and the DataMember to a table.ĮrrorProvider1.DataMember = dataTable1.TableName Row.SetColumnError("PostalCode", "Postal Code required") Row.RowError="The Customer details contain errors" ![]() Private void buttonSave_Click(object sender, System.EventArgs e)ĬustomersTable = dataSet1.Tables įoreach (DataRow row in (CustomersTable.Rows)) Row->SetColumnError( "PostalCode", "Postal Code required" ) ĮrrorProvider1.DataMember = dataTable1.TableName ![]() Row->RowError = "The Customer details contain errors" System::Collections::IEnumerator^ myEnum = (CustomersTable->Rows)->GetEnumerator() ĭataRow^ row = safe_cast(myEnum->Current) Void buttonSave_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )ĬustomersTable = dataSet1->Tables it does not need to be added to the form. Since the ErrorProvider control does not have a visible component, You set the DataSource to a data set, and the DataMember to a table.ĮrrorProvider1->DataMember = dataTable1->TableName The following code example shows how to use the ErrorProvider with a DataSource and DataMember to indicate a data error to the user. The string that represents a list within the data source specified by the DataSource to be monitored. Property System::String ^ DataMember member this.DataMember : string with get, set Public Property DataMember As String Property Value String Gets or sets the list within a data source to monitor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |