|
Hmm....seems like it likes
<br />
foreach(DataRow row in _dtPplan.Rows) <br />
{<br />
row.Delete();<br />
}<br />
_dtPplan.AcceptChanges();<br />
for deleting all rows than
<br />
_dtPplan.Rows.Clear()<br />
I have to test it a little more, but it seems like the index problem is gone now. It works with the add and delete buttons in the form by the way. Thanks for your help.
- Atle
|
|
|
|
|
hi all,
I need to shedule a Task in windows 2000.I can easily do it using Control Panel--->Sheduled Task ..
But How am I shedule a task using a C# Application..?
Can any one please help me.?
thanks in advance..
|
|
|
|
|
|
I'm using
System.IO.Directory.GetCreationTime(folderName)
to get the creation date of a folder, but it throws an ArgumentOutOfRangeException with the message
"Specified argument was out of the range of valid values.
Parameter name: Not a valid Win32 FileTime."
The folder in question is on a CDR that was burnt on a PC with a different datetime locale. Why is it that Windows Explorer can display the datetime of the folder without any problems, but the .net framework chokes on it? Does System.IO.Directory require some sort of CultureInfo to parse dates? If so, where do I specify this?
Thanks in advance
|
|
|
|
|
I am trying to limit the amount of time an ASP.NET Web Service can spend processing a client’s request.
Currently if the client sets it’s timeout to Infinite the server will allow the request to complete; however I want to stop the request and send a custom response back to the client after a specified time limit.
What is the best way of achieving this?
|
|
|
|
|
How can i get the hard disk Id or the motherboard ID programatically?
hosny
|
|
|
|
|
|
hi all,
in my code i'm populating a combobox which is one of the columns in th datagrid.
i want the combobox to be populated with data from two tables from the database.
like for example the 'name' and the 'Description'.
At present i'm getting only the 'name in the combobox.
how to get its description also ??
|
|
|
|
|
did you mean by using data binding or by the code
if you mean data binding i think you can not
bind combo box to two fields
in the code get the data and loop for each recored add the two fields value
|
|
|
|
|
i'm getting only the names in the combobox, but i also want the description to be next to the name separated by space.
m doing it as below...
newColumnStyle.MappingName = "New";
newColumnStyle.HeaderText= "New";
newColumnStyle.Width = 101;
newColumnStyle.MyComboBox.Items.Clear();
for(int i = 0; i < getData.Length; i++)
newColumnStyle.MyComboBox.Items.Add(getData[i].name );//here how to add in the combobox the 'getData[i].description'
tableStyle.GridColumnStyles.Add(newColumnStyle);
any help appreciated
|
|
|
|
|
try somthing like this
newColumnStyle.MyComboBox.Items.Add(getData[i].name + " " + getData[i].description)
|
|
|
|
|
thanx...silly me dinn think of concating...
but my problem ain't solved yet.
when i select one of the names, and then i fill in other columns other details, and click on 'save' button, only the name should be saved and not the description...
in save button click,
for each row,
for (int i = 0; i < dataTable.Rows.Count ;i++)
{
testData.name = Convert.ToString(dataGrid1[i ,2]).Trim();
//other details from the datagrid
//then i call a function to add the details from the datagrid in the database
addDetails(testData);
}
thanx for helping
|
|
|
|
|
you need to extract name only
some thing like the following will extract it
//text that contain both name and description
//" " the sperator replace it with your own
<br />
string name=text.Substring(1,text.IndexOf(" ")+1);
then testData.name=name
|
|
|
|
|
thank u
|
|
|
|
|
HI All, I want to write a "Send To" menu class using C#(it's function just link the "Send To" Menu in the windows OS,send files to a specified target,such as desktop,MyDocument,Mail Recipient etc.), and I've finished it ,but there is still some problems .I use COM code (use IShellFolder,IDropTarget etc.) to do this work, this is too complex I think, so I want to know are there any simple ways to do it?
Can we use command line to do it?
|
|
|
|
|
lin1161 wrote:
I use COM code (use IShellFolder,IDropTarget etc.) to do this work, this is too complex I think, so I want to know are there any simple ways to do it?
Can we use command line to do it?
How would you expect your command line code to make it into the shell ? The shell uses COM, you need to use COM to interface with it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If we can't use command line to do it , are there any other simple ways to do it?
|
|
|
|
|
As has been pointed out, there are no simpler ways than using the COM interfaces.
Sorry, you have to live with it.
Regards,
mav
|
|
|
|
|
|
Why ? He's already written it, he's saying it's too complex. This project does the exact same thing he has done, using the same COM interfaces.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
because he said "but there is still some problems "
i thought this code may help him
any way no problem
|
|
|
|
|
Thank you for your reply. I had seen it .It was written in c++,it also used COM code just as i did in c#, and this time I want to use a simple way to do it .
|
|
|
|
|
Please help me ,and this is really important to me.I will wait on line day and night.Many thanks!
|
|
|
|
|
look, several people have given you the answer. If you can live with it or not, is up to you. The answer won't change.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
There is another problem , I add the "Send To" menu items in the System's Send To folder , in win2000 ,all the "Send To" menu items are in this folder ,but in win_xp there are some items not in the system's Send To folder (such as floppy disk,DVD RW Drive),but they appears in system's send to menu. I just want to know does Windows puts “Removeable Drives” in the Send To menu automatically?
|
|
|
|