|
hi,
i am using Data access layer to populate the datagrid where i made certain columns as hidden, by using datakey property of gridview i can access first column which is hidden please tell me how to access other hidden columns value
thank you in advance!
sunny
|
|
|
|
|
use
Gridview1.datakeys[0]["Datakeyname"].tostring();
thank you guys,
sunny
|
|
|
|
|
hi all,
i am binding a datasource (access database) to datagridview.
i have a column which holds some values. and want to add a new row which will have two columns namely 'total' <text> and 'totalvalue' <sum of="" all="" values="" above="">.
how can i do this ?
any suggestion ?
thanks in advance, bye.
|
|
|
|
|
I haven't used DataGridView since we're using .NET 1.1 at work, but
if you have rows in your DGView with 1 column, I seriously doubt that you can add new rows containing 2 columns. Unless you can change existing 1 column rows into rows with 2 merged columns.
I'm only second guessing though.
-Larantz-
|
|
|
|
|
Hi,
can we start SQL Server Services programmatically in c#. if so how?
if anybody knows (or know about articles) then please let me to know.
Thanks in advance.
|
|
|
|
|
You can call "net start server-name" to start a service by using the Process class. It's not elegant but it should work..
|
|
|
|
|
Thanks Laubi,
i'll try it. but i need bit detail.
|
|
|
|
|
Just use the code from Paul Brower - this is the more elegant way I mentioned
|
|
|
|
|
private void CheckLocalDBService()
{
try
{
ServiceController[] services = ServiceController.GetServices() ;
foreach ( System.ServiceProcess.ServiceController cont in services)
{
if (cont.ServiceName.ToUpper().CompareTo("MSSQLSERVER") == 0)
{
if (cont.Status != ServiceControllerStatus.Running)
{
cont.Start() ;
cont.WaitForStatus(ServiceControllerStatus.Running,new TimeSpan(0,1,0)) ;
if (cont.Status == ServiceControllerStatus.Running)
{
//Service was successfully started
}
}
else
{
//Service was already running
}
}
}
}
catch
{}
}
|
|
|
|
|
Thanks alot Paul Brower,
and to all.
with Best regard,
|
|
|
|
|
To start/stop a service
MSDN
Sqlserveragent and Mssqlserver are two services you need to start.
|
|
|
|
|
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
|
|
|
|