|
Yeah, you can't reference a column before it's added to the table style! Remove the second line in your code sample. I don't know why you added it in the first place. You're already instantiating boolCol , so why are you (incorrectly) trying to get it then from the table styles - which you haven't added the column to yet?
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i made a little mistake while typing, it had to be :
DataGridBoolColumn boolCol; and not " = new DataGridBoolColumn "
boolCol = (DataGridBoolColumn) dataGrid.TableStyles["library"].GridColumnStyles["super"];
boolCol.MappingName = "super";
boolCol.TrueValue = true;
boolCol.FalseValue = false;
boolCol.Width = 150;
ts1.GridColumnStyles.Add(boolCol);
But if i remove the second line as you said it still doesn't work
then it's the same as it was before, de checkboxes are grey and you can't change them.
|
|
|
|
|
Again, you can't reference the column until it's actually added. You want DataGridBoolColumn boolCol = new DataGridBoolColumn(); .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
ok thx a lot!
another problem i just encountered was
boolCol.TrueValue = true;
should be:
boolCol.TrueValue = "true";
so now he does change the checkboxes
|
|
|
|
|
Of course, because both TrueValue and FalseValue (which you should also set) are string properties.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
yep i did that, it was just confusing because in the MSDN stood true and false and not "true" and "false"
but that might be different whether you are working with xml or not
|
|
|
|
|
They don't quote the strings because it's supposed to be obvious since the property type is a String .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi
i dont know how to subtract the 3 d[][][]
matrix and i want to know how to demonstrate the project
help me in matrix projects
|
|
|
|
|
Hi,
I had a big flickering problem. This is now partially solved. There's a big panel where the user can draw a rectangle while pressing the shift button. Until today everytime when the mouse was moved, I was redrawing the whole panel. This is not necessary. So now I only invalidate the 'old' rectangle (after moving the mouse). This is already much better. But when the user draws a very big rectangle, I get more and more flickering...
So here is my question: Is there an easy way to invalidate only the borders of the rectangle (so without it's interior). After I did this, I could draw the new rectangle... Or do I have to invalidate the 4 borders of the rectangle seperately?
Thanks...
TweeZz.
|
|
|
|
|
you could do that. invalidate using four rect, and these each rect invalidate onle one edge of rect. Its a cake to implement.
let me know if you have any other issue.
Shail Srivastav
shailsrivastav@hotmail.com
|
|
|
|
|
Hello,
I'm a kindof newbie to SOAP, so please help me with this problem. It could be a very basic one, but I'm trying to figure out what's wrong in this, since a couple of days now! The webservice runs fine when invoked from IE, but from my app, it doesn't receive the parameter.
Here's my setup information & code segments to help you help me:
* Server End:
Windows Server 2003 Enterprise Edition, IIS 6.0, VS.NET 2003
* Web Service:
The C# web service is just supposed to receive a string and return a string.
Code Segment:
[WebMethod (CacheDuration = 30)]
public string GreetMe(string sName)
{
return ("Hello " + sName + "!");
}
* At the Client End:
VC++ (MFC) - Using MS-SOAP Toolkit 3.0
I am not using a WSDL file, and I am directly trying to invoke the
Web Service.
Code:
void CSOAPClientDlg::OnBtnGetString() {
try
{
ISoapConnectorPtr psmConnector = NULL;
ISoapSerializerPtr psmSerializer = NULL;
ISoapReaderPtr psmReader = NULL;
CString csName;
psmConnector.CreateInstance(__uuidof(HttpConnector30));
psmConnector->Property["EndPointURL" = "http://172.16.1.95/WebServices/ws1/Service1.asmx";
psmConnector->Connect();
psmConnector->Property["SoapAction"] = "http://172.16.1.95/WebServices/ws1/GreetMe";
psmConnector->BeginMessage();
psmSerializer.CreateInstance(__uuidof(SoapSerializer30));
psmSerializer->Init(_variant_t((IUnknown *) psmConnector->InputStream));
psmSerializer->StartEnvelope("", "STANDARD", "");
psmSerializer->StartBody("STANDARD");
psmSerializer->StartElement("GreetMe", "http://172.16.1.95/WebServices/ws1/", "", "");
psmSerializer->StartElemen("sName", "", "STANDARD", "");
GetDlgItem(IDC_TXT_GREET)->GetWindowText(csName);
psmSerializer->WriteString(csName.AllocSysString());
psmSerializer->EndElement();
psmSerializer->EndElement();
psmSerializer->EndBody();
psmSerializer->EndEnvelope();
psmConnector->EndMessage();
psmReader.CreateInstance(__uuidof(SoapReader30));
psmReader->Load(_variant_t((IUnknown *) psmConnector->OutputStream), "");
GetDlgItem(IDC_TXT_XML)->SetWindowText((const char *)psmReader->RpcResult->xml);
GetDlgItem(IDC_TXT_GREET)->SetWindowText((const char *) psmReader->RpcResult->text);
psmConnector.Release();
psmSerializer.Release();
psmReader.Release();
psmSerializer = NULL;
psmReader = NULL;
psmConnector = NULL;
}
catch(...)
{
AfxMessageBox("Something Wrong! - 1");
}
}
* Problem:
When I provide the "String" in the dialog, the function above sends it in a SOAP request to my server (172.16.1.95). But the response from the server is just "Hello !" - Without the string that was sent to the server.
* On capturing the packet being sent, I have the following SOAP Request being sent to the server (172.16.1.95) on
my local network:
-----------
POST /WebServices/ws1/Service1.asmx HTTP/1.1
SOAPAction: "http://172.16.1.95/WebServices/ws1/GreetMe"
Content-Type: text/xml; charset="UTF-8"
User-Agent: SOAP Toolkit 3.0
Host: 172.16.1.95
Content-Length: 776
Connection: Keep-Alive
Cache-Control: no-cache
Pragma: no-cache
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAPSDK4:GreetMe
xmlns:SOAPSDK4="http://172.16.1.95/WebServices/ws1/" SOAP-
ENV:encodingStyle="">
<SOAPSDK5:sName
xmlns:SOAPSDK5="http://172.16.1.95/WebServices/ws1/GreetMe" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">Nirav</S
OAPSDK5:sName>
</SOAPSDK4:GreetMe>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
-----------
The "sName" parameter being sent in the message is not being received at the webservice end at all. Hence the reply message is without the "sName" value.
Thanks, in advance!
Rgds,
Nirav
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
Server side seems OK. You'd get better reply in VC forum. Have you tried to find any sample in internet which consume web service from VC6 with Soap Toolkit? I've used it in VB6 and it doesn't bother at all.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
Mazy,
Thanks for your reply!
I was not able to find any sample on the net which consumed web services from VC++ 6.0, hence I had to post my query - Hoping someone would've worked on it!
I am still looking harder for such samples.
Everything in the code seems right... But the parameter is not being received at the server end!
Thanks anyway,
Rgds,
Nirav Doshi
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
Hello,
I got the solution to the problem I was facing.
It was expecting a NAMESPACE parameter which I was not providing it. So by changing the following:
psmSerializer->StartElement("GreetMe", "http://172.16.1.95/WebServices/ws1/", "STANDARD", "mns");
psmSerializer->StartElement("nFirstNo", "", "STANDARD", "mns");
After I gave the last parameter "mns" for the namespace, the code worked as expected!
Posting this, just in case anyone had (or may have) a similar problem.
Righto!
Rgds,
Nirav
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
There are two types of channels that .NET framework provide 1)TCP and 2)HTTP and there are custom channels that u can create using any stream oriented transfer technology like Sockets, Named Pipes and MSMQ.
My question is which channel is suitable in which situation. Can anybody tell me when should i use named pipes channel and when MSMQ.
Need urgent response ....
@!$h@
|
|
|
|
|
If you use the TCP channel, then you have your own server code which is handling the reciept of the requests and issuing the responses.
The HTTP channel places your remoting objects in IIS and it handles all of the server functions with only your remoting objects needed. This lets you focus only on the functions the remote objects perform and not the server functions you need to expose.
Channels are the first part of it. Then there are formatters.
There are binary formatters and SOAP formatters. Generally, SOAP is horrendously slow. So you should stick to binary even over HTTP. (IIS establishes the binary formatter by default at the server side.)
______________________________
The Tao gave birth to machine language. Machine language gave birth to the assembler.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
|
|
|
|
|
what about other (custom) channels like MSMQ, Pipes, Sockets?
@!$h@
|
|
|
|
|
Dear @!$h@,
With any custom channel it is not as simple as just defining a channel...and anyone who even thinks of deploying remoting over Named Pipes should be taken outside and shot. Named Pipes is really an ancient technology that deserves a quiet death.
You may need to provide your own sink providers, incorporate sink formatters and sink serializers/deserializers. Most writings on remoting only discuss TCP or HTTP with no other form considered.
______________________________
The Tao gave birth to machine language. Machine language gave birth to the assembler.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
|
|
|
|
|
IIRC, someone did define a custom channel using MSMQ here on CodeProject. You could try a search to learn more (perhaps "MSMQ channel" for keywords). I believe it was by Roman Kiss.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
yes i referred to that but Roman Kiss only mentioned how to make MSMQ based Channel and not the advantages/disadvantages of using MSMQ channel over the other channels.
@!$h@
|
|
|
|
|
The advantages and disadvantages are whatever advantages and disadvantages of using MSMQ for anything, really. I don't have a lot of experience with MSMQ (just never had a good enough reason or opportunity as of yet). One advantage I can think of is a distributed system were you could have multiple remoting objects handling requests. I don't know if this would really be necessary, but it may be one way to do load balancing with massive clients connected if you devised a way that whichever remoting object answered first would cause the others not to handle the request. This can be achieved - and probably better - by implementing your own RealProxy derivative, for which the book, "Microsoft .NET Remoting" from MS Press[^], has an example.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Actually, I thought using the HttpChannel defaults to SOAP? In any case, though, the BinaryFormatter is much faster (even just for serialization, not to mention over the transport channel).
The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath Stewart wrote:
The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)!
nice piece of information. But this is about formatters and not channels. what i have conceived as yet is that there are only two available formatters SOAP and Binary and about Channels TCP and HTTP. You can write ur custom channels but the formatter you will associate with ur channel could be either SOAP or Binary. My question is about channels and not formatters.
@!$h@
|
|
|
|
|
Yes, I know. I was posting this in reference to what theRealCondor said - call it an aside. It was not intended to be a direct response to your question.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi, I've got a dll that performs some operation on file, I would like to know how to implement a progress bar, and if it's possible, not having access to osuce code dll, I can set minumum and maximum and step properties but odn't know how to set it for doing the step, since I don't have access to source.......thanks
Ciko2000
|
|
|
|