13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data-Grid control displays a red exclamation mark on the columns<strong>in</strong> error, as shown here:The DataRow Error <strong>Programm<strong>in</strong>g</strong> InterfaceThe tables <strong>in</strong> this section provide a quick overview of the properties and methodsavailable <strong>in</strong> the DataRow class <strong>for</strong> sett<strong>in</strong>g and gett<strong>in</strong>g error messages. Thesemessages are then tracked <strong>in</strong> the section of the DiffGram. Table 10-5lists the error-related properties of the DataRow class.Table 10-5: Error-Related DataRow PropertiesPropertyHasErrorsRowErrorDescriptionIndicates whether the row conta<strong>in</strong>s errorsGets or sets a custom error description <strong>for</strong> the rowThe HasErrors property is set to true when either the RowError property conta<strong>in</strong>s avalue or at least one column is not associated with an empty message. If you want toknow about all the columns with errors, use the GetColumnsInError method to obta<strong>in</strong>an array conta<strong>in</strong><strong>in</strong>g the DataColumn objects with errors.Table 10-6 shows the error-related methods of the DataRow class.Table 10-6: Error-Related DataRow MethodsMethodClearErrorsGetColumnErrorGetColumnsInErrorSetColumnErrorDescriptionClears all the pend<strong>in</strong>g errors <strong>for</strong> the row. Does notdist<strong>in</strong>guish between errors set us<strong>in</strong>g RowError anderrors set us<strong>in</strong>g SetColumnError.Gets the error description <strong>for</strong> the specified column.Returns an array of the DataColumn objects witherrors.Sets the error description <strong>for</strong> the specified column.Contents of the SectionA table row is assigned an element <strong>in</strong> the section if its HasErrorsproperty returns true. In this case, the element that represents the row <strong>in</strong> the datasection has an extra attribute, diffgr:hasErrors, as shown here:1DavolioNancyThe preced<strong>in</strong>g element is coupled with another element <strong>in</strong> the section <strong>in</strong>which the error messages are tracked, as follows:371

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!