Differences between revisions 7 and 28 (spanning 21 versions)
Revision 7 as of 2009-03-08 16:12:25
Size: 1881
Editor: 24-183-238-75
Comment:
Revision 28 as of 2021-02-25 00:01:31
Size: 621
Editor: scot
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
== Bible Beliefs Database Project ==
 1. Add the connection to the Data Connections in Server Explorer
 1. Add a data set item to the project. This is a nice gui place to create the data set. Drag and drop the tables on the page and you will build yourself a nice database diagram similar to what you would do in Visio.
 1. Next I added a DataGridView Object, bound it to the TopicTextViewOrdered and changed the column type to DataGridViewLinkColumn.
  1. Note the contextMenuStrip should be where we click to add a new belief possibly
  1. Turned TrackVisitedState to false.
  1. A BindingSource component is added at the bottom. Change the Sort Property to: TopicText ASC
 1. Double Clicked on DGV object to create a CellContentClick event handler. To start with I'll just do a MessageBox as shown in Section 1 of the code below
 1. Added another tableAdaptor for beliefs, as well as a BindingSource and BindingNavigator
  1. Have the TableAdaptor Fill the bibleDB DataSet

 * InformedPeopleApp
 * /DepricatedBibleBeliefsProject
 * /BibleBeliefsProjectMobile
 * /ClassApp
 * ArchaeologyProject
 * VirtualIpList
 * [[/Research]]
 * [[http://www.slideshare.net/planeviz/how-to-sell-your-airplane|How to sell your plane]]
 * [[/GateOpener]]
Line 20: Line 20:
//Section 1: Accessing the selected value
if (Utilities.IsANonHeaderLinkCell(()sender, e))
 . {
  . string cellValue = (string)dgvTopics.Rows[e.RowIndex].Cells[e.ColumnIndex].Value; MessageBox.Show(cellValue);
 }
Email Signature:
Line 26: Line 22:
//Section 2: Utility Function used in Section 1
public static bool IsANonHeaderLinkCell(DataGridView dgv, DataGridViewCellEventArgs cellEvent)
{
    if (dgv.Columns[cellEvent.ColumnIndex] is DataGridViewLinkColumn && cellEvent.RowIndex != -1)
    { return true; }
    else { return false; }
}
Scot Anderson, Ph.D.
Professor | School of Computing
423.236.2938
}}}
Line 34: Line 27:
//Section 3: Added to MainForm_Load to sort grid
this.dgvTopics.Sort(dgvTopics.Columns[1], ListSortDirection.Ascending);

}}}
Line 39: Line 28:

S
cot/PasswordList
 * [[scot/PasswordList]]

Dr. A

More info about Dr. "A" and his Wife Dr. Anderson can be found at http://www.scotnpatti.com.

Current Projects

Email Signature:

Scot Anderson, Ph.D.
Professor | School of Computing 
423.236.2938 


CategoryHomepage

scot (last edited 2021-02-25 00:01:31 by scot)