|
hi all,
how can i sort data displayed in datagridview with respect to a specific column ?
let's say i want it to be sorted wrt 1.st column ?
help please ...
thanks, bye.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: how can i sort data displayed in datagridview with respect to a specific column ?
Simply click on the (desired) column Header.
|
|
|
|
|
If you're using databinding, you can set the BindingSource.Sort member to the column you want to sort by.
|
|
|
|
|
i wnat to create a blue selection rectangle, i've tried to serch inside ControlPaint class but nothing.
Who can help me?
|
|
|
|
|
What exactly do you mean. Some blueish transparent thingie?
SolidBrush brush = new SolidBrush(Color.FromArgb(100, Color.Blue));
graphics.FillRectangle(brush, destRect);
graphics.DrawRectangle(Brushes.Black, destRect);
|
|
|
|
|
I have a string
I want to split it if it has more than one word
else I don't want to split it
Suggestions?
I don't know how to count the words in my string...
|
|
|
|
|
Hi,
Split the string from the blank spaces and store it into array.
Best Regards,
Apurva Kaushal
|
|
|
|
|
be care ful about:
Number of words = Number of blank space +1
ok
|
|
|
|
|
ofcourse
Best Regards,
Apurva Kaushal
|
|
|
|
|
i need help in these section, i uploaded a pdf file and converted it to a binary file and then
i want to encrypt the username and password string and embedding that to the excisting binary file what we have created from the
pdf formats
with regards
kannan
-- modified at 5:59 Thursday 1st June, 2006
|
|
|
|
|
Look into System.Security.Cryptography. All of the encryption algorithms are there. You may also want to search the forum for 'encrypting a string' to see an example of sending the data into a memory stream and running it through encryption.
|
|
|
|
|
Hi all,
When I use the following code in my C# Windows application, it works well.
File.WriteAllText(MapPath(@"softUser_log\log.txt"), "abcd");
But, I want to do the same thing in ASP.NET and I m hosting my files in a remote server "lunarpages" where they use PLESK. Now, When I execute the mentioned code, i dont see that
file has been created and written to it. Do I need to log in PLESK and manually change any permission ? If so, what is the permission should be. I was familiar with Linux and Unix where I used to set permission 777 to a Folder to create or delete file from it, 666 to a file to write on it. But in PLESK, i got very confused, becasuse in Permission area, i saw "user name, IIS domain...etc..etc.... "
Can anyone help me please,.
Thanks and regards
|
|
|
|
|
I'm not clear as to where you code is sitting and where your file needs to be saved. However your URI name is incorrect if you plan to save it to a remote server. You have to make the name: \\server\share\path....\filename to do any kind of save across a network to a server.
If your application is on a server and you are saving the file ON THAT SERVER, then you need to do two things:
1) make certain your folder is created prior to executing your code
2) make certain you have given JUST THAT FOLDER write permissions.
This is from the IIS point of view.
As to PLESK, never heard of it and don't know what you have to do. You may have to get technical support from the lunarpages webmaster instead of us.
|
|
|
|
|
How do we give messagebox autoresponse.
That is message box should not wait for clicking ok button it should be
pop-up and removed.
Rahul Kulkarni
|
|
|
|
|
make your own form. MessageBox needs response from user.
|
|
|
|
|
Create your own form.
In the Form.Load() start a timer.
On the timer.Tick() event, stop the timer, close the form, and return.
|
|
|
|
|
I have use ENTER key to move focus from current control(textbox, combo,etc) to the next control in the tab index list. I get that done, but windows sound a 'ding' everytime i hit enter. The ding does not sound when TAB or UP-DOWN arrows are used.
Ive tried alot of stuff, but i do'nt know why it's sounding, so i ca't
really say for shure where to look.
How can I disable the 'ding' when using the ENTER key?
Andre
|
|
|
|
|
InOut.NET wrote: How can I disable the 'ding' when using the ENTER key?
Check ur Control Panel>>Sound settings.
|
|
|
|
|
programmatclly. I don't want to disable the sound globally, just for the control.
|
|
|
|
|
You need to catch the control's KeyPress event and set the Handled property of the KeyPressEventArgs to true:
private void comboBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == 13)
e.Handled = true;
}
|
|
|
|
|
|
Hi for all!
I have some problem, while try to read and copy locked or files witch in use.
I try this method, witch work for some file, but the others not
my way:
<br />
FileStream fs = null;<br />
<br />
try<br />
{<br />
try<br />
{<br />
fs = File.OpenRead(file);<br />
}<br />
catch<br />
{<br />
fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read);<br />
}<br />
}<br />
catch<br />
{<br />
try<br />
{<br />
string NewFile=File+"_";<br />
Fi.CopyTo(NewFile, true);<br />
}<br />
catch<br />
{<br />
try<br />
{<br />
File.Copy(file, NewFile, true);<br />
}<br />
catch<br />
{<br />
}<br />
}<br />
} <br />
}<br />
catch (Exception e)<br />
{<br />
MessageBox.Show("Grrrrrr: "+e.Message);<br />
}<br />
I miss somethink, or I need a nother way to figure out windows file locking system.
I wait for any ideas....
Thank's for help.
|
|
|
|
|
Try to copy first and then open the new file.
For example :
You have a file "hello.txt". Then you can lock it using
FileStream fStream = new FileStream("hello.txt", FileMode.Open);
If you try to copy it, it works... File.Copy("hello.txt", "hello_1.txt");
Then just open "hello_1.txt".
|
|
|
|
|
Thanks stancrm!
It was the first think I try. But some files it not works. Exampl MS Outlook .pst files can't copy, while Outlook is open.
|
|
|
|
|
I think it is write. It is the reason, why you cannot copy .pst file, if the file is open.
It because of inconsistence reason somehow.
|
|
|
|