How do I prevent the default values of my Localized properties form being set?

It is normal to have Properties in your Control/Component whose default values are inherited from some other Control/Component. In such cases you will normally prevent the designer from storing the property’s value in code (using either DefaultValue attribute or the ShouldSerializeXXX pattern). However, if that property is Localizable and Localization is turned on, then the property’s value will be forced to be stored in the resource. This will break your property-inheritance logic. For example: [ Localizable(true) … ] public Font MyControlButtonFont { get { if(this.buttonFont == null) return this.Font; else return this.buttonFont; } set { this.buttonFont = value; } } private bool ShouldSerializeMyControlButtonFont() { if(this.MyControlButtonFont == this.Font) return false; else return true; } In the above case the MyControlButtonFont inherits its value from the Font property, if its value is not set. And you use null to determine whether the value is set or not. But when Localization is ON, the property gets SET and you lose the inheritance logic. You can avoid this by specifying an AmbientValue attribute for your property, as follows: [ Localizable(true), AmbientValue(null) … ] public Font MyControlButtonFont This will use the AmbientValue as the value to persist when there is default-value in your property. This will prevent your property from getting SET unnecessarily.

How do I get the row and column of the current cell in my datagrid

You can use the CurrentCell property of the DataGrid. private void button1_Click(object sender, System.EventArgs e) { intcolNum = dataGrid1.CurrentCell.ColumnNumber; int rowNum = dataGrid1.CurrentCell.RowNumber; object cellValue = dataGrid1[rowNum, colNum]; string s = string.Format(‘row={0} col={1} value={2}’, rowNum, colNum, cellValue); MessageBox.Show(s); }

When I try to update a dataset I get an error that the system is unable to find ‘Table’?

Are you calling Update on the dataset like this without specifying the name of the table that you are updating. The problem is that when table names are not given the system assumes a table name of ’Table’. This of course causes the update to fail. this.dataAdapter.Update(this.dataSet); If so just change this line to this.dataAdapter.Update(this.dataSet, ‘Customers’); // replace ’Customers’ with the table that you have

What is a DataSet?

Think of a DataSet object as a local in memory copy of database tables. With the client server model, client applications held onto a connection and updated and added records at will. With ADO.NET the dataset presents a disconnected model. Data as well as data changes are contained in the dataset with no physical connection to the datasource. Changes can be reconciled against any datasource at any time. A Dataset is not limited to database tables. It can work with XML or for that matter any other data.