|
Hello, I have a DataGridView on a Windows Form , it has 3 columns, one of them is a CheckboxColumn, the other two columns are set to be automatically sortable.
The problem is that when I sort one of the sortable columns, the selected checkboxes in the CheckBox column are lost..
How can I keep the checked checkboxes checked after performing a sort on another column.
modified on Saturday, February 14, 2009 7:20 AM
|
|
|
|
|
If I populate a listview with somethinglike:
foreach (DebtorDataSet.DebtorListRow row in debtorDataSet.DebtorList.Rows)
{
ListViewItem item = listView.Items.Add(row.Code);
item.SubItems.Add(name);
item.SubItems.Add(row.IsPostcodeNull() ? "" : row.Postcode);
item.SubItems.Add(row.IsTelephoneNull() ? "" : row.Telephone);
}
How can I set the backcolor of a row to red if row.Telephone is null please?
|
|
|
|
|
Well, The method ListViewItem.SubItems.Add() can take a simple string to create a subitem, but it also can take a ListViewItem.ListViewSubItem object to do the same thing.
So, you can create ListViewItem.ListViewSubItem subitem, set its BackColor property to whatever you want, and then add it to the SubItems collection of your ListViewItem
ListViewItem.ListViewSubItem it1 = new ListViewItem.ListViewSubItem();
it1.BackColor = Color.Red;
item.SubItems.Add(it1);
|
|
|
|
|
hello...
my form has a static image like a photo of 100 computers. then my application pings the systems and if the destination is reachable then the corresponding computer must have a green light else a red one.
the problem is that the image has to be the same and only a part of it has to be changed,
i am thinking of doing this with the help of graphics in c# and would be pleased if any other methods work.... thank you .
|
|
|
|
|
|
|
hi evryone
how can i run WS in Win server 2003 ?
i need to make virtual directory to put there my WS file
but it give me only make Web to put there my WS file
what can i do ?
i make many WS that work on Win XP and all work excelent, whay in Win 2003
it dosent ?
thank's for any help
|
|
|
|
|
What is WS ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'll bet he means a "website". Been like this since Chris made us pay per character for each post. Text is expensive, so we need to cut down on the length of the messages.
I are troll
|
|
|
|
|
WS[^]
(I guess so)
|
|
|
|
|
Even an educated guess remains.. a guess
I are troll
|
|
|
|
|
i mean WebService, and i work in IIS in Windows server 2003
but i can't run my web service under IIS
|
|
|
|
|
E_Gold wrote: hi evryone
Helloes
E_Gold wrote: how can i run WS in Win server 2003 ?
Add it to IIS as an application.
E_Gold wrote: what can i do ?
Post an error-message here if you get stuck, or a specific question. Chances that someone will write a walkthrough are slim.
E_Gold wrote: i make many WS that work on Win XP and all work excelent, whay in Win 2003
it dosent ?
Because it's a real server-product, whereas XP isn't.
Checklist;
- Did you create a new application in IIS?
- Did you check the permissions?
- Did you install all required components?
Questions;
- Does the server work when you put a plain HTML file in the folder? Does it get served correctly to the browser?
- Can you run a simple aspx-file that only displays the current time, without too much login-logic and stuff?
I are troll
|
|
|
|
|
We have a webservice to send sms.We need to load the modem configuration during the initial startup of the webservice in the IIS.We need something similar to form load event in windows application.But in this case we have to load the configuration during the first time startup of the webservice in IIS.
Thanks in advance....
|
|
|
|
|
How about Application_Start in global.asax?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
relevent to my previouse question.is there any differnce when passing values to sql 2000 and to sql 2005 using parameters and in c# 2005 , if so what is it ?
|
|
|
|
|
prasadbuddhika wrote: relevent to my previouse question.
We don't know what that was....
prasadbuddhika wrote: .is there any differnce when passing values to sql 2000 and to sql 2005 using parameters and in c# 2005 , if so what is it ?
Why would there be ? In what sense do you mean ?
The most likely answer is no. They wouldn't sell many copies of SS 2005 if it means people have to rewrite their code and their SQL to use it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
why this repost? musefan[^] already told you SQL2000 uses question marks, not names, and hence needs the parameters in the right order.
Luc Pattyn [Forum Guidelines] [My Articles]
- 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 the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:06 AM
|
|
|
|
|
Does anybody come across the requirement of compressing clickonce deployment files. My project is of size 80 MB which i want to compress and use clickonce to compress it copy it to client uncompress and install. (clickonce supports Http compress, which i don't want to use.)
any ideas?
Thanks.
|
|
|
|
|
Member 2324483 wrote: any ideas?
Yes, build a smaller app, or break the app into modules that can be downloaded when necessary.
only two letters away from being an asset
|
|
|
|
|
I have a C# application creating a pdf document. The pdf document might be open, or during creation caused an exception and other things can happen. I know I can catch FileNotFound, DirectoryNotFound and general IOException exceptions. However, if the file is open I want to be able to tell the user to close it or if my code caused exception halfway during the creation I want to be able to release the lock on it.
How can I find out what specifically happened? Is the file open? Did the creation failed halfway?
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
following classes are derived from IOException:
DirectoryNotFoundException
EndOfStreamException
FileNotFoundException
FileLoadException
PathTooLongException
Calin
|
|
|
|
|
Suggestion, add appropriate checks and make your code full proof.
For instance, when you try to open the file (File.Open or File.OpenWrite)
- you can check for what all exception the API throws(MSDN should give you the list of exception it throws) and then you can return the appropriate Failure code(if your using a failure code mechanism) or rethrow the exception with a proper message based on the type of exception that occured.
- you should also add checks like File.Exists etc. The more checks you put the more confidence you will have.
- and if you are still not confident of things then additionally have a generic exception block for unhandled scenarios.
Well, in addition to the above you should have a finally block to release the lock no matter what happened in the processing.
|
|
|
|
|
This is a c#/sql reporting services problem.
Basically we have a c# application using the ReportViewer control to view sql reports. The problem is we have the c# culture set to display dates dd-mm-yyyy. When we go to view a report, it works fine, but the textboxes for the date parameters are refreshed incorrectly, they swap the month and day values. If we change the culture settings for the application to mm-dd-yyyy, it works fine, but this is unacceptable since it changes for the whole application.
Thanks in advance for any help
|
|
|
|