Bonjour,
Voilà j'ai une application qui analyse des fichiers log volumineux, les lignes de ce fichier sont affiché dans une listeview.windows XP SP2
Visual C# Express
FrameWork 2.0
Cependant dans la liste view la chaine pvalue est toujours tronquée.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 private void UpdateVal(string pvalue) { ListViewItem item1 = new ListViewItem(pvalue.Substring(0, 23)); item1.SubItems.Add(pvalue); listView1.Items.Add(item1); }
Voici ce que contient pvalue en mode debug:
La chaine affichée dans le listview est tronquée :"2006/09/29-06:25:55.873 SCMGSC:SCOE=EMITC MsgName=SERVICE_REQUEST OUT Message= 0x10 1x00 2x00 3x2a 4x00 5x00 6x00 7x00 8x10 9x20 10x00 11x00 12x00 13x00 14x00 15x41 16x45 17x8c 18x01 19x61 20x54 21xa1 22x00 23x00 24x4d 25x53 26x47 27x20 28x4f 29x43 30x4f 31x45 32x23 33x23 34x23 35x23 36x23 37x23 38x23 39x23 40x00 41x20 42x01 43x02 44x03 45x04 "
Je perd ainsi de l'information."2006/09/29-06:25:55.873 SCMGSC:SCOE=EMITC MsgName=SERVICE_REQUEST OUT Message= 0x10 1x00 2x00 3x2a 4x00 5x00 6x00 7x00 8x10 9x20 10x00 11x00 12x00 13x00 14x00 15x41 16x45 17x8c 18x01 19x61 20x54 21xa1 22x00 23x00 24x4d 25x53 26x47 27x20 28x4f 29x43 30x4f 31x45 32x23 33
Voici les caractéristiques de la listeview et des colonnes :
Merci d'avance pour votre aide, je n'arrive pas à trouver la solution
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 // // columnHeader3 // this.columnHeader3.Text = "Date"; this.columnHeader3.Width = 150; // // columnHeader4 // this.columnHeader4.Text = "Data"; this.columnHeader4.Width = 25000; // // listView1 // this.listView1.Alignment = System.Windows.Forms.ListViewAlignment.Left; this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.listView1.AutoArrange = false; this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader3, this.columnHeader4}); this.listView1.ForeColor = System.Drawing.Color.SteelBlue; this.listView1.FullRowSelect = true; this.listView1.GridLines = true; this.listView1.LabelEdit = true; this.listView1.Location = new System.Drawing.Point(177, 36); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(1075, 447); this.listView1.TabIndex = 0; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details;
cldt,
Partager