We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customized binding in DataGrid

Thread ID:

Created:

Platform:

Replies:

5280 Jun 27,2003 03:19 AM UTC WinForms 0
loading
Tags: FAQ
Jack Martly
Asked On June 27, 2003 03:19 AM UTC

Hi everybody, I have a DataSet containing some DataTables and some DataReltions between them. I bind DefaultViewManager of the DataSet to a DataGrid on a Windows Form: 1. I want to allow a kind of selective navigation between my DataTables. I mean i want user to see only some of DataRelations of each DataTable below each row in DataGrid not all of them. Is this possible? 2. DataGrid displays the name of each DataRelation object in DataSet by default. But i would like to display a custom string, e.g. its caption. What can i do? 3. I attached an EventHandler to OnRowChanging of one of my DataTables. I check if a column is null, like this: private void RowChanging(object sender, RowChangeEvent e) { if (e.Row.mt_name.Length == 0) { string errorMessage = String.Format(messages.GetString("columnNull"), pcDataSet.material_type.mt_nameColumn.Caption); throw (new System.Exception(errorMessage)); } } The DataGrid displays my error message plus a "Do you want to correct the value?" in a dialog box with Yes and No buttons. Is this behavior overridable? Can i show a customized dialog box? 4. On of my cloumn in a DataTable have a unique constraint. When user enters a duplicate value, again that dialog box appears saying: "The column "mt_name" is constrained to be unique. Do you want to correct the value?". How can i catch this error? Any comment is really appreciated. Jack

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;