Click here to Skip to main content
15,905,914 members
Home / Discussions / C#
   

C#

 
GeneralRe: cpu temperature Pin
yoaz13-Mar-08 23:11
yoaz13-Mar-08 23:11 
GeneralRe: cpu temperature Pin
ziwez013-Mar-08 23:41
ziwez013-Mar-08 23:41 
Generalcompare date error Pin
angels77713-Mar-08 20:58
angels77713-Mar-08 20:58 
GeneralRe: compare date error Pin
Giorgi Dalakishvili13-Mar-08 21:42
mentorGiorgi Dalakishvili13-Mar-08 21:42 
GeneralRe: compare date error Pin
Anubhava Dimri13-Mar-08 23:13
Anubhava Dimri13-Mar-08 23:13 
GeneralRe: compare date error Pin
Anubhava Dimri13-Mar-08 23:13
Anubhava Dimri13-Mar-08 23:13 
GeneralRe: compare date error Pin
angels77714-Mar-08 1:52
angels77714-Mar-08 1:52 
GeneralRe: compare date error Pin
Anubhava Dimri14-Mar-08 2:11
Anubhava Dimri14-Mar-08 2:11 
Questionhow to draw grid points? Pin
Aravinthan13-Mar-08 20:02
Aravinthan13-Mar-08 20:02 
QuestionHow to send and receive file through parallel port????????? Pin
Anez.A13-Mar-08 19:37
Anez.A13-Mar-08 19:37 
AnswerRe: How to send and receive file through parallel port????????? Pin
Matthew Butler14-Mar-08 3:20
Matthew Butler14-Mar-08 3:20 
GeneralRe: How to send and receive file through parallel port????????? Pin
Anez.A16-Mar-08 18:49
Anez.A16-Mar-08 18:49 
GeneralRe: How to send and receive file through parallel port????????? Pin
Matthew Butler28-Mar-08 4:32
Matthew Butler28-Mar-08 4:32 
GeneralRe: How to send and receive file through parallel port????????? Pin
Anez.A30-Mar-08 18:45
Anez.A30-Mar-08 18:45 
QuestionHow to add images to toolstrip menu? Pin
Aravinthan13-Mar-08 19:35
Aravinthan13-Mar-08 19:35 
Generalinsert the records from dataset into database Pin
Miss Maheshwari13-Mar-08 18:47
Miss Maheshwari13-Mar-08 18:47 
AnswerRe: insert the records from dataset into database Pin
Pankaj Garg13-Mar-08 19:57
Pankaj Garg13-Mar-08 19:57 
GeneralFinding Memory Leaks Pin
MAW3013-Mar-08 15:42
MAW3013-Mar-08 15:42 
GeneralRe: Finding Memory Leaks Pin
OR0N13-Mar-08 15:44
OR0N13-Mar-08 15:44 
GeneralConditionally loading global variables Pin
Glen Harvy13-Mar-08 15:25
Glen Harvy13-Mar-08 15:25 
GeneralRe: Conditionally loading global variables Pin
Christian Graus13-Mar-08 16:12
protectorChristian Graus13-Mar-08 16:12 
GeneralImpossible to programaticaly assign values to a binded datagridview Pin
baranils13-Mar-08 11:55
baranils13-Mar-08 11:55 
Hello

It seems really impossible to programaticaly assign values to a binded datagridview. In the following example I'm trying to renum a column value
The result is unpredictible : some values are assigned, some not ?
Some are reflected to the binded dataset but not all ?

private void Rit_Renum()
{
  int Step;
  int Order = 1;
  int.TryParse(txb_renum.Text, out Step);
  if (Step < 0) Step = 1;
  dgv_rit.Columns["order1"].SortMode = DataGridViewColumnSortMode.NotSortable;
  Order = 1;
  for (int i = 0; i < dgv_rit.Rows.Count; i++)
  {
    if (dgv_rit.Rows[i].Cells["order"].Value == null) break;
    dgv_rit.Rows[i].Cells["order1"].Value = Order;
    Order += Step;
  }
  dgv_rit.Refresh();
}


I start with a sorted list 1 to 12
I swap a few contiguous rows values
(11 = 12, 12=11) then sort
(10=11, 11=10) then sort
(9=10, 10=9) then sort
So now the original row 12 have the value 9 and the position of 9
Then I renum with a step of 3

The result is this ??

1
3
4
6
7
9
10
12
16
22
28
34

Does anyone undersdand what happen !
GeneralRe: Impossible to programaticaly assign values to a binded datagridview Pin
Christian Graus13-Mar-08 12:14
protectorChristian Graus13-Mar-08 12:14 
GeneralRe: Impossible to programaticaly assign values to a binded datagridview Pin
baranils13-Mar-08 12:22
baranils13-Mar-08 12:22 
GeneralRe: Impossible to programaticaly assign values to a binded datagridview Pin
Christian Graus13-Mar-08 12:39
protectorChristian Graus13-Mar-08 12:39 

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.