Click here to Skip to main content
16,005,037 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionActive document support/alternative in .NET Pin
davidstroem31-Aug-06 21:25
davidstroem31-Aug-06 21:25 
QuestionException handling.... Pin
CherezZaboro31-Aug-06 8:49
CherezZaboro31-Aug-06 8:49 
AnswerRe: Exception handling.... Pin
Jun Du31-Aug-06 10:07
Jun Du31-Aug-06 10:07 
AnswerRe: Exception handling.... Pin
Not Active31-Aug-06 18:39
mentorNot Active31-Aug-06 18:39 
QuestionOn Alt+Tab Pin
Draders2331-Aug-06 1:42
Draders2331-Aug-06 1:42 
Questiona question about GAC and strong names. Pin
Green Fuze31-Aug-06 0:49
Green Fuze31-Aug-06 0:49 
AnswerRe: a question about GAC and strong names. Pin
Douglas Troy1-Sep-06 6:45
Douglas Troy1-Sep-06 6:45 
QuestionBindingSource position after table.AddRow(..) Pin
mikepc31-Aug-06 0:20
mikepc31-Aug-06 0:20 
Hi all, here is my problem:

(system is VS 2005, C#, ADO .NET 2)
I have a bindingsource, a datagrid, and set of details like fields on the same
form. Next, there are following bindings set:

void Init()
{
BindingSource.DataSource = someLocalTable
datagrid.DataSource = BindingSource

for every control
{
Control.DataBinding.Add("...", BindingSource, "...")
}
}

Moving through a datagrid changes the data in bound detail controls, hence
BindingSource too, changes position. Changing data in controls changes
the data in selected dataGrid row.

The problem is:
I have a button "Insert New", that does exactly this:

1. adds a new row in the local someLocalTable and
fills it with the default values:
DataRow dr = someLocalTable.NewRow();
... fill default values
someLocalTable.Rows.Add(dr);

2. TRIES TO CHANGE THE BINDINGSOURCE-s POSITION TO LAST(newly created table row)
3. This is the step where after changing position on the bindingSource
to the newly created row (.MoveLast()), you expect detail fields change
to null (or empty), and dataGrid changes the ActiveRow and position

However, after adding new row to someLocalTable, I can not change the position
of the bindingSource to that new row. BindingSource.Count returns good nr. of
rows, including the newly created. I tried a lots of things, like rebind all
controls like on the Init method, still no luck. Am I missing something here?
I forgot to mention that the grid is actually Infragistics ultraGrid, but that
doesn't change the basic concept...

Mike

AnswerRe: BindingSource position after table.AddRow(..) Pin
Keith Malwitz31-Aug-06 17:31
Keith Malwitz31-Aug-06 17:31 
GeneralRe: BindingSource position after table.AddRow(..) Pin
mikepc31-Aug-06 21:48
mikepc31-Aug-06 21:48 
QuestionComboBox binding and panel Pin
saud_a_k31-Aug-06 0:20
saud_a_k31-Aug-06 0:20 
QuestionDeveloping HL7 compatible programs Pin
atulxxx30-Aug-06 22:53
atulxxx30-Aug-06 22:53 
AnswerRe: Developing HL7 compatible programs Pin
coolestCoder30-Aug-06 23:09
coolestCoder30-Aug-06 23:09 
GeneralRe: Developing HL7 compatible programs Pin
atulxxx30-Aug-06 23:19
atulxxx30-Aug-06 23:19 
AnswerRe: Developing HL7 compatible programs Pin
Not Active1-Sep-06 2:32
mentorNot Active1-Sep-06 2:32 
QuestionSource control problem in don net 2005 Pin
Ravikumar Patra30-Aug-06 21:34
professionalRavikumar Patra30-Aug-06 21:34 
QuestionGetting info from another application's datagrid Pin
MrWhite34030-Aug-06 18:53
MrWhite34030-Aug-06 18:53 
QuestionHow to solve CONTEXTSWITCHDEADLOCK Pin
cnr36930-Aug-06 2:27
cnr36930-Aug-06 2:27 
QuestionHow Microsoft does it? Pin
jayvardhanpatil30-Aug-06 0:34
jayvardhanpatil30-Aug-06 0:34 
QuestionDateFormat Pin
Nagaraju_Focus29-Aug-06 21:11
Nagaraju_Focus29-Aug-06 21:11 
AnswerRe: DateFormat Pin
John Petersen30-Aug-06 0:40
John Petersen30-Aug-06 0:40 
AnswerRe: DateFormat Pin
Mike Dimmick30-Aug-06 1:46
Mike Dimmick30-Aug-06 1:46 
AnswerRe: DateFormat Pin
Guffa30-Aug-06 19:40
Guffa30-Aug-06 19:40 
QuestionComboBox.Items.Insert(int index, object obj) - > whats the object? Pin
saud_a_k29-Aug-06 19:24
saud_a_k29-Aug-06 19:24 
AnswerRe: ComboBox.Items.Insert(int index, object obj) - > whats the object? Pin
Nagaraju_Focus29-Aug-06 21:16
Nagaraju_Focus29-Aug-06 21:16 

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.