Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Listview behaviour
Message
 
To
20/07/2006 15:50:08
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01138022
Message ID:
01138320
Views:
17
Hi Bonnie, the rest of the code is simply adding more subitems and obviously adding the item to the listview, as I stated, the first item in the list is checked, here's the code anyway
private void LoadListView()
        {
            
                this.lvClaims.Items.Clear();
                ListViewItem lvItem;
                string ClaimRef;
                string PathToDBOForm;

                foreach (DataRow dr in this.dsClaims.Tables[0].Rows)
                {
                    lvItem = new ListViewItem(dr["PayDetailsConf"].ToString());
                    lvItem.Text = "";
                    lvItem.Checked = (bool)(dr["PayDetailsConf"]);
                    lvItem.SubItems.Add(dr["PayDetailsConfDate"].ToString());
                    lvItem.SubItems.Add(dr["PayDetailsConfUser"].ToString());
                    ClaimRef = dr["ClaimRef"].ToString();
                    lvItem.SubItems.Add(ClaimRef);

                    lvItem.SubItems.Add(dr["CreditorName"].ToString());
                    lvItem.SubItems.Add(dr["ClaimStatus"].ToString());
                    lvItem.SubItems.Add(dr["AdmitList"].ToString());
                    lvItem.SubItems.Add(dr["PayBlockCode"].ToString());
                    lvItem.SubItems.Add(String.Format("{0:#,#,#,#.00}", dr["AdmittedBalUSD"]));
                    lvItem.SubItems.Add(DateUtils.ShortDate(dr["Article39LetterDate"].ToString(), null));
                    lvItem.SubItems.Add(DateUtils.ShortDate(dr["Article39AmendDate"].ToString(), null));
                    lvItem.SubItems.Add(dr["Article39Code"].ToString());
                    lvItem.SubItems.Add(dr["PayDetailsID"].ToString());
                    lvItem.SubItems.Add(dr["PayAddressID"].ToString());
                    lvItem.SubItems.Add(dr["Article39Narrative"].ToString());


                    PathToDBOForm = this.BuildPath(ClaimRef);

                    if (File.Exists(PathToDBOForm))
                    {
                        lvItem.SubItems.Add(PathToDBOForm);
                        lvItem.ImageIndex = 1;
                    }

                    this.lvClaims.Items.Add(lvItem);
            }
        } 
Regards,
Peter J. Kane



Pete
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform