Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   How to update the time for any Item-ListView (http://www.go4expert.com/forums/update-time-item-listview-t4231/)

shah123 8May2007 16:45

How to update the time for any Item-ListView
 
Hi,
Code:

private void editBtn_Click(object sender, EventArgs e)
        {
            if (scheduleListView.SelectedItems.Count > 0)
            {

                if (scheduleListView.SelectedItems[0].Selected)
                {
                 
                    scheduleListView.Items.Add(lvt);
                    scheduleListView.Update();
                    scheduleListView.Invalidate();
                }
                         
        }
}

I have hour and minute control as DomainUpDown controls and when i change the time for any of those control time should be updated in listview for that selected item. Give me any rough idea please.

Thanks

shabbir 8May2007 17:35

Re: How to update the time for any Item-ListView
 
You change the text of the item sub items. How to get the item / sub items you can refer to your previous posts where I have mentioned it.

shah123 8May2007 17:44

Re: How to update the time for any Item-ListView
 
I didnt understood what you mean?

shabbir 8May2007 18:17

Re: How to update the time for any Item-ListView
 
I thought I was clear. Update the content of the items / sub items.

shah123 9May2007 13:42

Re: How to update the time for any Item-ListView
 
No Shabbir brother can you be more specific please? Thanks

shah123 9May2007 13:50

Re: How to update the time for any Item-ListView
 
Any help. Just some more explanation that what I am doing scheduled application where I have two controls for hour and minutes as DomainUpDown Controls and i have a button as edit. Now the query is when i select any item in ListView and then change the hour and minute for that item and then click on edit which will update the starting time of that event.

Now the code for edit which i was trying to write as my last thread.

shabbir 9May2007 14:53

Re: How to update the time for any Item-ListView
 
Code: CSharp

ListViewItem lvi = listView1.Items[0];
lvi.SubItems[0].Text = "Shabbir";

It will change the item 0,0 to my name.

shah123 9May2007 14:55

Re: How to update the time for any Item-ListView
 
It worked thanks. I got the idea of items and subitems perfectly. Thanks again Shabbit bhai

shabbir 9May2007 15:10

Re: How to update the time for any Item-ListView
 
I think you should have tried the same. You are becoming lazy in trying till you get the code.

shah123 9May2007 16:08

Re: How to update the time for any Item-ListView
 
ahahhaa... I am not lazy com'n .. and some snippet code or algorithm just makes life easier instead of text :) Anyway thanks Shabbir.


All times are GMT +5.5. The time now is 00:10.