Click here to Skip to main content
15,901,035 members
Home / Discussions / C#
   

C#

 
QuestionDelete a portion of image Pin
Sasuko28-Mar-06 23:11
Sasuko28-Mar-06 23:11 
QuestionCan I get a message when user add a breakpoint? Pin
tiancaidao28-Mar-06 22:32
tiancaidao28-Mar-06 22:32 
AnswerRe: Can I get a message when user add a breakpoint? Pin
tiancaidao29-Mar-06 18:28
tiancaidao29-Mar-06 18:28 
Questionwhy unsafe block Pin
haseeb_saeed28-Mar-06 22:22
haseeb_saeed28-Mar-06 22:22 
AnswerRe: why unsafe block Pin
WillemM29-Mar-06 0:18
WillemM29-Mar-06 0:18 
QuestionSelect Row Pin
Rmokkenstorm28-Mar-06 20:53
Rmokkenstorm28-Mar-06 20:53 
AnswerRe: Select Row Pin
AB777128-Mar-06 21:38
AB777128-Mar-06 21:38 
GeneralRe: Select Row Pin
Rmokkenstorm28-Mar-06 21:43
Rmokkenstorm28-Mar-06 21:43 
The second form should be showing all the info that's clicked on the row of the datagrid on the first form
.
but in checkboxes.

my code:
it's looks kinna messy but i only post the important pieces here.
Form 1
<br />
public delegate void CustomRowHandler(object sender, CustomRowEventArgs e);<br />
<br />
public static event CustomRowHandler CustomRow;<br />
<br />
InitializeComponent();<br />
			barryOracleDataAdapter1.Fill(barry11.Barry);<br />
			CustomRow += new CustomRowHandler(customHandler_CustomRow);<br />
<br />
<br />
		private void customHandler_CustomRow(object sender, WindowsApplication30.CustomRowEventArgs e)<br />
		{<br />
			Barry1  DSet = e.DSet;<br />
			DataGrid grid = e.Grid;<br />
			int row = e.Row;<br />
		<br />
			<br />
			textBox2.Text = e.DSet.Tables[0].Rows[e.Row]["lastname"].ToString();<br />
<br />
<br />
		public void dataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)<br />
		{<br />
			<br />
			int rowIndex = dataGrid.CurrentRowIndex;<br />
			if (CustomRow != null)<br />
			{<br />
              	<br />
			<br />
<br />
			   CustomRow(this, new CustomRowEventArgs(barry11,dataGrid, rowIndex));<br />
				DataForm1 frm = new DataForm1 (barry11,dataGrid, dataGrid.CurrentRowIndex);<br />
			    frm.Show();<br />
			<br />
			}<br />
}<br />
<br />
	public class CustomRowEventArgs : EventArgs<br />
	{<br />
		<br />
		Barry1  barry11;<br />
		DataGrid grid;<br />
		int row;<br />
<br />
		public CustomRowEventArgs(Barry1 DSet,DataGrid Grid,int Row)<br />
		{<br />
				<br />
			barry11 = DSet;<br />
			grid = Grid;<br />
			row = Row;<br />
				<br />
		}<br />
		public Barry1 DSet<br />
		{<br />
			get { return barry11; }<br />
		}<br />
		public DataGrid Grid<br />
		{<br />
			get { return grid; }<br />
		}<br />
		public int Row<br />
		{<br />
			get { return row; }<br />
		}<br />
}<br />

---------------------------------------------------------------------------
Form 2
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
		{<br />
			//<br />
			// Required for Windows Form Designer support<br />
			//<br />
			InitializeComponent();<br />
			Form1.CustomRow += new<br />
				WindowsApplication30.CustomRowHandler(customHandler_CustomRow);<br />
<br />
<br />
		private void customHandler_CustomRow(object sender, WindowsApplication30.CustomRowEventArgs e)<br />
		{<br />
			<br />
			<br />
				Barry1 DSet = e.DSet;<br />
				DataGrid grid = e.Grid;<br />
				int row = e.Row;<br />
			<br />
editLASTNAME.Text = e.DSet.Tables[0].Rows[e.Row]["Firstname"].ToString();<br />
		<br />
			}<br />

GeneralRe: Select Row Pin
AB777128-Mar-06 23:38
AB777128-Mar-06 23:38 
GeneralRe: Select Row Pin
Rmokkenstorm28-Mar-06 23:58
Rmokkenstorm28-Mar-06 23:58 
GeneralRe: Select Row Pin
Rmokkenstorm29-Mar-06 20:55
Rmokkenstorm29-Mar-06 20:55 
GeneralRe: Select Row Pin
esjq29-Mar-06 22:06
esjq29-Mar-06 22:06 
GeneralRe: Select Row Pin
Rmokkenstorm29-Mar-06 22:14
Rmokkenstorm29-Mar-06 22:14 
GeneralRe: Select Row Pin
esjq29-Mar-06 22:18
esjq29-Mar-06 22:18 
GeneralRe: Select Row Pin
Rmokkenstorm30-Mar-06 2:47
Rmokkenstorm30-Mar-06 2:47 
GeneralRe: Select Row Pin
esjq30-Mar-06 19:45
esjq30-Mar-06 19:45 
GeneralRe: Select Row Pin
Rmokkenstorm30-Mar-06 20:00
Rmokkenstorm30-Mar-06 20:00 
QuestionNeed Help in DataGridView Pin
_mubashir28-Mar-06 20:48
_mubashir28-Mar-06 20:48 
QuestionForm Focus Problem Pin
Shajeel28-Mar-06 20:01
Shajeel28-Mar-06 20:01 
AnswerRe: Form Focus Problem Pin
yesimlucky28-Mar-06 20:08
yesimlucky28-Mar-06 20:08 
GeneralRe: Form Focus Problem Pin
Shajeel28-Mar-06 20:27
Shajeel28-Mar-06 20:27 
AnswerRe: Form Focus Problem Pin
albCode28-Mar-06 20:10
albCode28-Mar-06 20:10 
Questionc# webcam issues Pin
jalintz28-Mar-06 19:57
jalintz28-Mar-06 19:57 
Questionhow to show scroll bar in list contrll allways Pin
baldha rakesh28-Mar-06 19:44
baldha rakesh28-Mar-06 19:44 
AnswerRe: how to show scroll bar in list contrll allways Pin
cbhkenshin28-Mar-06 22:20
cbhkenshin28-Mar-06 22:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.