|
DataSet allow me to add a new column to the end of DataSet . But , I want to add a new column to the first (or anywhere) of DataSet . How to insert a new column in anywhere of DataSet?
Thanks a lots if you help me .
imagic
|
|
|
|
|
Hello,
First of all you can not add column in a DataSet . You can do it in a DataTable . Can you explain why do you want to insert column at a specified index?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Becase those columns aren't in database . But , I want them appear in DataGrid (in specified position) .
Is DataTable allow me to insert a new column in anywhere ?
Or you want me to add column sequently ?
imagic
-- modified at 5:19 Saturday 11th February, 2006
|
|
|
|
|
Hello,
You can add columns sequentially. You can use DataGridTableStyles for displaying column in whatever sequence you want.
HTH. Cheers.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Thanks a lot . I do it successfully .
imagic
imagic
|
|
|
|
|
Hi there.
I'm pretty new in using C# and VS2005. I've made a little program that opens a calender in a windows form. Here's the trouble:
How can I read the mouse buttons so that I can know if the program is startet by a click (then the left button will still be pressed down when my program starts) or by key press on the keyboard? I can not get the information before the program startes, so I can not open it with this information as a parameter.
I need it to set the position to either the pointers position (when started by mouseclick) or center on the screen (when started by keyboard).
I know that a windows form contains the possibility to call a method upon mouseclick. But in this case, the left mousebutton is pressed down before the program executes and the form opens. But of course, in the beginning of the program, the left button will still be pressed down. So I think that it will be possible to detect, I just don't know how
I hope that somebody can help me, thanks in advance.
__________________
John Reinhold - DK
|
|
|
|
|
This came up on Raymond Chen's blog[^], I seem to recall that it isn't very feasible to get such a thing to work. I could be wrong; you'd have to search that blog to be sure, or if someone more knowledgeable than I knows better...
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Does anybody have any code that will check to see if Visaul Studio 2005 is installed on the host machine? I have written a utility that requires that is is on the machine for it to function property but I havn't be able to figure out how to check if VS 2005 is actually installed.
thanks,
-dk
|
|
|
|
|
|
Sorry, I know that this isn't the right place for this type of Questionl, but i realy need help.
Please help me... I have a real brain boggler of a problem. This is the code i'm using...
<xsl:template match="TableEndOfDay">
<table border="1" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="1" cellspacing="0" cellpadding="1" width="100%">
<xsl:for-each select="StaffID">
<tr>
<th><font face="Tahoma">hallo</font></th>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</table>
</xsl:template>
As Soon as i take out the xsl:for-each statement, the "hallo" displays once in the tables.
BUT as soon as i use the code as it is, the only thing showing is the outer tables' border. I need to be able to display the "hallo" once each time for each StaffID. It is quite urgant to me. Please help..... Any advice is welcome. At this point, i'll try anything.
|
|
|
|
|
JJDPPROG wrote: Sorry, I know that this isn't the right place for this type of Questionl
Totally correct that this does not belong here but we are all tolerant people here. This sounds alot like homework, so try looking futher on the web and let us know what the solution is.
|
|
|
|
|
It is not homework. I only put that example of the code to make it easier to explain it to me. The "hello" is actually Data that has to be displayed from the database and i thouht it to be easier to just explain this easy example...
|
|
|
|
|
I appologise. Sounded bit like a grade 2 question, never used that little xsl. Lets see the xml and I'll see if I can help.
|
|
|
|
|
paste some of xml you are trying to transform.
|
|
|
|
|
Here is the xml snippit...
<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='EndOfDayReport.xsl'?>
<EndOfDayReport>
<Heading>
<EndOfDayReportOpskrif>End of Day/Month Report</EndOfDayReportOpskrif>
<ReportPeriod>Report Period: 24 November 2005 - 25 November 2005</ReportPeriod>
<DateCreated>Date Created: 2006/02/10 03:43:48 PM</DateCreated>
</Heading>
<TableEndOfDay>
<StaffID xmlns="2">
<StaffName>Pieter</StaffName>
<Services>
<ServiceID xmlns="1">
<ServiceKey>BW.1</ServiceKey>
<ServiceDescription>BLOW WAVE - SHORT</ServiceDescription>
<Qty>1</Qty>
<Percent>1%</Percent>
<Amount>140.00</Amount>
</ServiceID>
<ServiceID>
<ServiceKey>BW.2</ServiceKey>
<ServiceDescription>BLOW WAVE - MEDIUM</ServiceDescription>
<Qty>0</Qty>
<Percent>0%</Percent>
<Amount>0</Amount>
</ServiceID>
|
|
|
|
|
JJDPPROG wrote: tableEndOfDay
XML is case-sensitive.
JJDPPROG wrote: StaffID xmlns="2"
That xmlns looks incorrect.
|
|
|
|
|
Hi,
I'm sure this is really simple, but my mind has turned to mush at the moment and I just can't figure the best way to sort this out.
I need to create a new log file at the beginng of each day. This will be running in a service, periodicly writing to the file.
Whats the best way to be notified of the start of a new day? A timer with high resolution constantly checking the date running on a thread? That seemed like a heavyweight approach...
Cheers!
|
|
|
|
|
Can't you do the check inside the function that writes to the log?
e.g.
public void WriteToLog( String message )
{
if (currentday != lastlogday)
{
close current log file
create new log file
lastlogday = currentday
}
write message to log
}
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
Sadly no, Its a shared resource. The log file is created and then passed in by ref to a couple of other threads that both write to it.
I've don't it the timer way for now, at least that gets the functionaly working.
Thanks for the help though...
|
|
|
|
|
Hi!
Instead of a high resolution timer checking constantly you could use a simple timer with a 24h interval.
During initialization of your app you setup the timer with an initial interval calculated until midnight.
In the Ticked/Elapsed event you set the interval to 24h and create the new log file.
Should do the trick...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi,
I have a problem where I want to shutdown an external win32 software client from my C#/ASP.net application by pressing a button. I understand that I have to use WM_CLOSE somehow but I dont know how to use it in my C# solution.
I use shelling (VBscript) to lanuch external software on my computer:
Example:
function()
...
objShell.run ("""C:\Program Files\Overview\Overview.exe""- u testuser - p testuser
endfunction()
This works great but if the application( in this case overview.exe) is already running I want to be able to shut it down by pressing a button before I lanuch it .
Please help!
/Ibana
|
|
|
|
|
I want to provide Notification facility in my windows application. When some task is assigned to a particular user by the admin, the task should be displayed in the Inbox(Form in the application) to that user real time.(If that User is logged into the application.) How can the user get info regarding new assigned task? Do I need to have a seperate background process for checking the newly added tasks?
Regards,
Shah Adarsh
|
|
|
|
|
There is no need to use a separate thread to look for the updates, as the main thread is mostly just waiting for anything to happen anyway.
Add a timer to the form, and in the Tick event look for updates.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks Guffa.
But if I do not use another thread, the other task performed by the user will be affected.
Any other way to check the updates than the timer?
Regards,
Shah Adarsh.
|
|
|
|
|