|
I need to display a running total as a user enters percent numbers.
The first on is in a gridview like this
CheckBox Item 1 [ percent]
CheckBox Item 2 [ percent]
.
.
CheckBox Item 12 [ percent]
Footer Show total percent as users enters [ Total Percent]
The next percents in a nested repeater that is dependant on the checkboxex from the gridview, I would like to get past the gridview first.
thanks for any help
|
|
|
|
|
You should be a little more clear. Im not sure about everyone else, but that doesn't make much sense to me.
allenpotter wrote: The next percents in a nested repeater that is dependant on the checkboxex from the gridview, I would like to get past the gridview first.
What does that mean? Be more clear on what you need help with, I'd love to help you out, I just don't understand what you are trying to do.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I have nested repeaters that display the items checked from the gridview and expand them further--as I stated, I just want to get past the gridview--adding the percent and displaying it as a user put them in.
|
|
|
|
|
Hello I don't speak english very well but i would like to open a web page from Visual Studio 2005 with C# language. Is it possible to do this with a method because i find nothing about it.
Thank a lot!
Pascal Gosselin
|
|
|
|
|
Hi Pascal,
Maybe try this:
System.Diagnostics.Process.Start("http://www.website.com");
Regards
Steve
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
What is the most efficient way to remove controls completely on a form before adding new controls on the same form. I tried like
Controls.Clear
foreach(Control c in Controls)
{
c.dispose();
}
|
|
|
|
|
Clear is the fastest way I'm aware of.
|
|
|
|
|
I think perhaps Clear will remove the controls from the list of controls associated with the control
And that dispose will actually, well, dispose of them.
Im not to sure, if you .dispose a control, can you re-add it? Or do you need to actually recreate the control? Check it out.
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
SK Genius wrote: I think perhaps Clear will remove the controls from the list of controls associated with the control
And that dispose will actually, well, dispose of them.
I agree.
SK Genius wrote: if you .dispose a control, can you re-add it?
no, it is no longer alive.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi All,
I am using a ListView Control to display clients connected to a server. The ListView is set to View.Details and has three columns, 1) Client ID, 2) Client Name 3) Connection Status.
What I would like to do is update the 'Connection Status' SubItem to display whether they are connected or disconnected. Can anyone shed any light, thanks.
Regards
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
You need to work with the SubItems[^] property of a ListViewItem object.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Sorry, still can't see how I can do it.
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
Here is what I am trying to do, from what I've read:
string search = "x1";
string status = (ConnectionStatus) ? "Connected" : "Disconnected";
int i_row = myListView.Items.IndexOfKey(search);
myListView.SelectedItems[i_row].SubItems[3].Text = status;
However the i_row value returned is always -1
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
Kayess Tech,
Does your ListView.Items have an item called "x1"?
Regards,
Gareth.
|
|
|
|
|
Yes, I have updated from my previous post the ListView items
look like this
Col 1, Row 1 = Client ID (eg 23)
Col 2, Row 1 = Client Name (eg Steve)
Col 3, Row 1 = Connection Status (Connected / Disconnected) This is the subitem I want to change programatically.
Col 4, Row 1 = Identifier (in this case 'x1')
The next Row Identifier would be x2 and so on...
Thanks
"You don't scare me Selene."-Tanis
"We'll have to work on that."-Selene
(Underworld Evolution)
|
|
|
|
|
It appears your searching your List View Items instead of each item's SubItem.
Try something along the lines of this.
int i_row;
string search = "x1";
string status = (ConnectionStatus) ? "Connected" : "Disconnected";
for (int i = 0; i < myListView.Items.Count; i++)
{
if (!(myListView.Items[i].SubItems.IndexOfKey(search) == -1))
{
i_row = i;
myListView.Items[i].SubItems[3].Text = status;
break;
}
}
modified on Friday, January 18, 2008 5:53:11 AM
|
|
|
|
|
Hi,
Thanks, but that didn't work either. However I did find a solution
string search = "x1";
string status = (ConnectionStatus) ? "Connected" : "Disconnected";
for (int i = 0; i < myListView.Items.Count; i++) {
{
ListViewItem item = myListView.Items;
if(item.SubItems[4] == search)
items.SubItems[3].Text = status
}
Thanks all for your suggestions.
"You don't scare me Selene."-Tanis
"We'll have to work on that."-Selene
(Underworld Evolution)
|
|
|
|
|
Hi
I am writing a small network protocol library for an internal project and I got one question I have been wondering whether is possible or not.
Lets assume I have a button for starting the network service (or heavy file IO for that matter) with a .start() method. Now, the object representing the service should just start and run in the background (threading), but at certain points it should signal events (delegates). How can I make sure these delegates are run NOT in the background thread, but in the same thread as started the service with the .start() method? I know I inside the callback can run BeginInvoke after the delegate has been signaled, but I was wondering if there was a more transparent solution where the initiator dont have to even bother to handle the thread issue? It would be so sweet if the delegate automatically was run within the main thread.
Any ideas?
These concurrency issues are my last huge obstacle to overcome before I consider myself confident with the .NET framework and C#, so I would be eternal grateful for any hints on this topic. Thanks a lot
|
|
|
|
|
Hi,
when you're done counting bit patterns, here is an article[^] that should interest you.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Thanks! will do
|
|
|
|
|
Nice to have an article referenced
|
|
|
|
|
just trying to run my own google service here...
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
This may be a stupid question, but here it goes: will this method for instance work on Mono with gtk# or cocoa#, or is it bound to Windows.Forms? I am just asking so I know the limitations.
|
|
|
|
|
Sorry, I don't know about Mono.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Another question relating this matter.
If the library is running a thread that is using blocking sockets, and the object representing the library has a "Stop" method, how can this be made thread safe? Its kind of like the same question except the other way around.
|
|
|
|