Click here to Skip to main content
15,910,471 members
Home / Discussions / C#
   

C#

 
QuestionOutlook dev question Pin
szukuro14-May-07 10:27
szukuro14-May-07 10:27 
AnswerRe: Outlook dev question Pin
dotnetcdr16-May-07 0:04
dotnetcdr16-May-07 0:04 
GeneralRe: Outlook dev question Pin
szukuro16-May-07 0:28
szukuro16-May-07 0:28 
GeneralRe: Outlook dev question Pin
szukuro16-May-07 0:36
szukuro16-May-07 0:36 
Questionproblem to retrieve relational data from tables. [modified] Pin
hdv21214-May-07 10:26
hdv21214-May-07 10:26 
AnswerRe: problem to retrieve relational data from tables. Pin
Christian Graus14-May-07 10:42
protectorChristian Graus14-May-07 10:42 
Questionproblem to retrieve relational data from tables. Pin
hdv21214-May-07 10:23
hdv21214-May-07 10:23 
QuestionProblem with events Pin
~~~Johnny~~~14-May-07 8:50
~~~Johnny~~~14-May-07 8:50 
In the following code I register for two events in the last two lines. The evnts fire for the first time the form is loaded but from the second time and on, events are not registered anymore. I tired different things like adding
dataGrid.Scroll -= new ScrollEventHandler(dataGrid_Scroll);
dataGrid.KeyPress -= new KeyPressEventHandler(dataGrid_KeyPress);
beofre assigning dataGrid to the new FinderDataGridView object but stil doesn't work.

I guess the question is what is the correct way of registering for events when you reassign an object to a new one?

Hopefully the question is clear Unsure | :~

public void SetFinder(ComplexObject finderObject)
{
complexObject = finderObject;
view = complexObject[0].DefaultView;
initialFilter = view.RowFilter;
dataGrid = new FinderDataGridView(view, complexObject[0].QuickFinderColumns, complexObject);
dataGrid.ColumnHeadersVisible = false;
datagridSplit.Panel2.Controls.Add(dataGrid);
emptyTable = new DataTable();
foreach (DataColumn column in finderObject.Tables[0].Columns)
{
if (column.ColumnMapping == MappingType.Element)
{
emptyTable.Columns.Add(new DataColumn(column.ColumnName, column.DataType));
}
}
emptyDataGrid.DataSource = emptyTable;
emptyTable.Rows.Add(emptyTable.NewRow());
emptyTable.AcceptChanges();
dataGrid.Scroll += new ScrollEventHandler(dataGrid_Scroll);
dataGrid.KeyPress += new KeyPressEventHandler(dataGrid_KeyPress);
}
AnswerRe: Problem with events Pin
Martin#14-May-07 20:13
Martin#14-May-07 20:13 
QuestionSQl Server express Edition Pin
Agyeman14-May-07 8:47
Agyeman14-May-07 8:47 
AnswerRe: SQl Server express Edition Pin
Dave Kreskowiak14-May-07 8:56
mveDave Kreskowiak14-May-07 8:56 
GeneralRe: SQl Server express Edition Pin
Paul Conrad14-May-07 8:59
professionalPaul Conrad14-May-07 8:59 
AnswerRe: SQl Server express Edition Pin
~~~Johnny~~~14-May-07 8:57
~~~Johnny~~~14-May-07 8:57 
AnswerRe: SQl Server express Edition Pin
Paul Conrad14-May-07 8:58
professionalPaul Conrad14-May-07 8:58 
AnswerRe: SQl Server express Edition Pin
kubben14-May-07 9:01
kubben14-May-07 9:01 
AnswerRe: SQl Server express Edition Pin
SimulationofSai14-May-07 9:08
SimulationofSai14-May-07 9:08 
QuestionEnd of a string array element Pin
LCI14-May-07 6:11
LCI14-May-07 6:11 
AnswerRe: End of a string array element Pin
Ed.Poore14-May-07 6:14
Ed.Poore14-May-07 6:14 
GeneralRe: End of a string array element Pin
LCI14-May-07 6:22
LCI14-May-07 6:22 
GeneralRe: End of a string array element Pin
Ed.Poore14-May-07 6:28
Ed.Poore14-May-07 6:28 
GeneralRe: End of a string array element Pin
LCI14-May-07 6:31
LCI14-May-07 6:31 
GeneralRe: End of a string array element Pin
Ed.Poore14-May-07 7:08
Ed.Poore14-May-07 7:08 
GeneralRe: End of a string array element Pin
Judah Gabriel Himango14-May-07 6:31
sponsorJudah Gabriel Himango14-May-07 6:31 
GeneralRe: End of a string array element Pin
LCI14-May-07 6:35
LCI14-May-07 6:35 
GeneralRe: End of a string array element Pin
Giorgi Dalakishvili14-May-07 6:41
mentorGiorgi Dalakishvili14-May-07 6:41 

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.