|
Hi All
Export to excel data from ultrawebgrid rows, Each data row contain one worksheet in excel sheet like as
row1 data contain sheet1
row2 data contain sheet2
row3 data contain sheet3
this opertaion getting at a time on pressing one button.
we have pressing one button ultrawebgrid rows data to export excel sheet, In excel sheet each worksheet contain one grid row deatails,
for example grid have 10 rows ,pressing any button,
In excel sheet 10 worksheets will occure and each worksheet contain 1 row data of grid pls send me a solution for this example
sunny
|
|
|
|
|
Suppose I have two custom classes, class A and class B. What I want to do is access the propeties and methods of class B from Class A using index notation e.g. A[index].B_property1, A[index].B_method1, etc.
How do I do this in C#?
Thanks!
|
|
|
|
|
Do you mean to access this form another class other than a and b,
eg:
Class c
{
A[ind].//Method from b ? .
}
|
|
|
|
|
class A needs to contain an array of class B instances, then you need to write your own indexing code. Here[^] is an example.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I've asked this once before, and got no suggestions that worked. Is there a way to get the SMTP server details from either a COM object or the registry when the user has Outlook ? What about Outlook Express ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I just got done writing an ATL/COM addin for Word and I remember something in the registry that might help. See HKCU\Software\Microsoft\Office\Outlook ... I have a key: OMI Account Manager and under that I have details on each account including the SMTP info.
If you don't see this info there is probably a way of finding it with COM... I can try help.
Alex Korchemniy
|
|
|
|
|
Thanks for your help - that key exists, but it is empty, although I've set up an SMTP account. I've searched the entire registry, and the server is not there. Any info you can give me on the COM objects would be appreciated.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello. I have a windows based application in C#, and i am using a reference to Word 2003. My problem is launching time as it takes way too much to start the application. Used the debug to see why and what i have noticed is that the whole problem lies with loading Word interop dll file:microsoft.office.interop.word.dll It takes somewhere between 25 and 30 seconds to get this dll loaded from GAC. Any one has any idea why? How can i speed this up?
Thanks
|
|
|
|
|
Use C++, you won't have this problem.
|
|
|
|
|
Does it take a long time to start _your_ app or to launch Word via automation?
Alex Korchemniy
|
|
|
|
|
Can someone please give me some information on sending data through a USB port. What I am trying to do is use the USB port (I get how to do it on a COM port). I am using VC# 2005. I have searched the internet repeatedly but cannot find anything.
Overall, what I am trying to do is just activate a LED with a transistor via a progam made in C# by hooking up the the BASE pin of the transistor to the DATA+ pin on the USB cable and then powering the circuit with the cable. Sorry if this is a horrible description... Then, theoretically, send data through the data line to flip the transistor on. (btw: this is just an experiment)
Thanks!
|
|
|
|
|
For something low-level like this: C++ is the perfect and most comfortable language to use
Search for DeviceIoControl
Alex Korchemniy
|
|
|
|
|
|
Thanks, I'll check those out.
|
|
|
|
|
Hi guys, my aswer is this:
I created a very simple appliation called ElevatorApp. When I start my 2 threads, both of them enter in the WaitSleepJoin state, and I don't know why.
My intention with this app is: when the thread 1 starts it lock the Floor object, set it and release it. In the thread 2, it will see that the floor is the same that the elevator is stops and show their name.
Please, can anyone helps me?
Thanks a lot.
class Class1
{
[STAThread]
static void Main(string[] args)
{
Random rGen = new Random();
int iNum = rGen.Next(0,19);
Floor floor = new Floor();
Elevator Elv1 = new Elevator(floor, iNum);
Elevator Elv2 = new Elevator(floor, iNum);
Thread T1 = new Thread(new ThreadStart(Elv1.Move));
Thread T2 = new Thread(new ThreadStart(Elv2.Move));
T1.Name = "Elevador 1";
T2.Name = "Elevador 2";
T1.Start();
T2.Start();
}
}
public class Elevator
{
private Floor andar;
private int iDest;
public Elevator(Floor floor, int iNum)
{
andar = floor;
andar.iFloor = 0;
iDest = iNum;
}
public void Move()
{
if(andar.iFloor != iDest)
{
andar.iFloor = iDest;
}
else
{
iDest = andar.iFloor;
}
}
}
public class Floor
{
private int floor;
private bool bDef = true;
public Floor()
{
}
public int iFloor
{
get
{
lock(this)
{
if(!bDef)
{
Console.WriteLine(Thread.CurrentThread.Name);
}
else
{
Monitor.Wait(this);
}
Monitor.Pulse(this);
}
return floor;
}
set
{
lock(this)
{
if(bDef)
{
if(floor != 0)
{
Console.WriteLine("Chamada no andar {0}", floor);
bDef = false;
}
else
{
Console.WriteLine("Terreo");
}
}
else
{
Monitor.Wait(this);
}
floor = value;
Monitor.Pulse(this);
}
}
}
}
|
|
|
|
|
I'm not sure what you're trying to do. The reason the two threads are in the WaitSleepJoin state is that one of the threads executing the Move function tries to access the iFloor property, acquires the monitor and executes Monitor.Wait. It then relinquishes the monitor and goes to the WaitSleepJoin state. The second thread also follows the same path, acquires the monitor and then waits till someone pulses it.
The bottomline is that both threads execute Monitor.Wait and no one is calling Monitor.Pulse.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I'm having this strange problem where I have updated data in one MDI child window, and want to refresh the data in another MDI child window.
I have a function called populateExhibitions which fills a listview with data from my db. This works fine first time round. But when I called populateExhibitions from another MDI child window,
i.e
<br />
frmExhibitions fExhibitions = new frmExhibitions();<br />
fExhibitions.populateExhibitions();<br />
it then calls my populateExhibitions function again, but it never updates the data in the list view. Even though the data coming from the database is indeed updated! (The datareader object proves this to me!)
<br />
public void populateListViewExhibitions(DataListView.DataListView dataListView)<br />
{<br />
dataListView.Items.Clear();<br />
OdbcConnection objConnection = new OdbcConnection(getConnString());<br />
string sql = "Select id, name from exhibitions order by name";<br />
<br />
objConnection.Open();<br />
OdbcCommand objCommand = new OdbcCommand(sql, objConnection);<br />
OdbcDataAdapter objDataAdapter = new OdbcDataAdapter(objCommand);<br />
DataTable dtListView = new DataTable();<br />
<br />
objDataAdapter.Fill(dtListView);<br />
dataListView.AutoDiscover = false;<br />
dataListView.Columns.Add("ID", "ExhibitionID", 200);<br />
dataListView.Columns.Add("Name", "name", 200);<br />
dataListView.DataSource = dtListView;<br />
<br />
objConnection.Close();<br />
<br />
objConnection.Open();<br />
OdbcDataReader objDataReader;<br />
objDataReader = objCommand.ExecuteReader();<br />
<br />
<br />
while(objDataReader.Read())<br />
{<br />
MessageBox.Show("Name = " + objDataReader["Name"].ToString());<br />
<br />
<br />
}<br />
<br />
objDataReader.Close();<br />
objConnection.Close(); <br />
}<br />
What am I missing here?
|
|
|
|
|
greg_quinn wrote:
frmExhibitions fExhibitions = new frmExhibitions();
fExhibitions.populateExhibitions();
In the first line, you are creating a new instance of the form, and that's the one you are refreshing. What you want to do is to access the existing instance. You could try storing the instance in a public field in your main form class, or if you will only have one instance of that child, in a static field in the frmExhibitions class.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
What I am trying to do is this: take contact information from a database and create a .pst file that can be imported into Outlook.
So far, I have only been able to update the contact information on my own computer. Is there anyway to export that contact info to a .pst with C#?
|
|
|
|
|
I have an MDI child window in which I am updating data. Once this data is updated I need to call a function in another existing MDI child window.
How do I call this function in the other MDI child window?
Thanks
|
|
|
|
|
You need to have a reference to the other child window you need to call. You can have a property or constructor parameter that allows the main form to set the child window reference.
Or, you can have the main form act as a mediator and pass a reference to it to all child forms. The child forms then call methods on the main form, which in turn calls appropriate methods on the child forms.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi, Sir and Madam
Is it possible to get my webpage url and website url
Thank You.
|
|
|
|
|
god4k wrote:
Sir and Madam
Both!? There is only one person I know that could fit both, and she is post-op now so is really now just a Madam.
god4k wrote:
Is it possible to get my webpage url and website url
Yes....
In your web form (the class derived from Page ) you will have access to a property called Request which returns an HttpRequest[^] object. There is a propery on the HttpRequest called Url[^]. This will give you the webpage URL.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I have been working on a client/server application model for a long time and am having a terrible time dealing with file transfer. The main problem is basically having to build and parse the messages myself. I have been looking through a lot of Remoting and other forms of client/server interaction and it seems like some of the ideas here would provide a much more efficient and elegant solution to a client/server program.
What I have been kind of wandering is if there is a simple way to serialize data then send it to the server who in turn just channels it to the appropriate client after doing some basic extraction/parsing. From what I've seen if I could utilize XML and SOAP then the task shouldn't be too difficult, but as I am waiting for some books to arrive on the subjects, I am eager to get started.
Can anyone lead me in the correct direction if I wanted to do the following:
Serialize messages into XML format to send to the server
Server receives the XML message, parses it, then sends it along to the approporiate client
It seems intuitive that if, instead of streaming binary data to send files manually (which is how I am currently having to approach it) I could just serialize a byte array, or in the case of images, serialize a PictureBox, this whole mess could be cleaned up simply.
Any assistance would be appreciated.
|
|
|
|
|
Sounds like you want to build a web service.
Christian Graus - Microsoft MVP - C++
|
|
|
|