|
Identities are evil, they cause nothing but trouble like you're experiencing now, don't use them.
|
|
|
|
|
Check my edited reply to your duplicate version of this question in Questions and Answers.
Short version - You can't do what you're trying to do the way you're trying to do it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I have small Windows Forms project.
And My DataGridView Query like the following manner:
string MyQuery1="select field1,field2,field3 from myTable"; Con.Open(); MySqlAdapter=New sqlAdapter(MyQuery1,con); MySqlAdapter.fill(MyTable); Con.Close(); DataGridview1.DataSource=MyTable; Now, my DataGridView's columns displaying like
Field1, Feidl2, Field3... good in English Mode...[Left to right]
But when My user changes his keyboard language this datagridview should display like the below manner...Is it possible?
Field3, Fiedl2, Field1 [Right to left]
Thanks && Regards
PARAMU
|
|
|
|
|
1) Format your code snippets using the "code block" toolbar item
A simple way would be to have another query with the field order reversed.
I know the language. I've read a book. - _Madmatt
modified on Wednesday, June 29, 2011 11:59 AM
|
|
|
|
|
This should work. I've just tried it and it seemed to do exactly what you wanted.
dataGridView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
|
|
|
|
My 1/2 tension get released.
Nice & Wonderful !!!
Thanks For The Helps...!
Thanks & Regards
PARAMU
|
|
|
|
|
Hello Everyone,
Sorry for putting this question in this board. I didn't find any broad for WCF.
I am trying to develop couple of Web Services (which I have done already in ASMX version)
Now as a reference and for development ease, I want to do this like:
domain.com/store.svc/Products?APIKEY={KEY}&ProductId={Id}
I searched a lot on WEB but unfortunately not able to find any resource which can help me with this.
I will be thankful to you all for any suggestions and pointers.
Thanks
Amit
|
|
|
|
|
logicon wrote: I didn't find any broad for WCF.
What about the one in the list to the left marked "WCF".
The best things in life are not things.
|
|
|
|
|
You maybe want to look in to RESTful services. See here[]as a starting point.
|
|
|
|
|
Here for a complete tutorial.
|
|
|
|
|
How can i convert a Datatable to a Multi line in C#??????Ihave a DataTable with Values,and i want now to convert all of them in a multi line Graph in C# my first Row have information with Date and time,and will be my X Axis, and the other Rows,will be my Y axis with Value of censor.
may be some one can help me
Thx in advance
|
|
|
|
|
|
I am facing a problem related to get out all the controls from some hooked process. My SpyDll launched into hooked process sucessfully, But when I check the statement
Control control = Control.FromHandle(MainWindowHandle), it returns null into control object where "MainWindowhandle"is just a native main window handle of that hooked process, which you always take from .NET "Process" class after launching that process.
But STRANGLY it happens that in some other hooked process which is the same C# .NET application, it returns valid object of Main "WinForm".
So why it will not work in above case? Are there any exceptions to use "MainWindowHandle" properly. In my case both are seperate .NET managed processes programmed in C#. Any process configuration needs to maintain specially while creating that process?
Regards Usman
|
|
|
|
|
hi,
i am using dotnet remoting sometimes i getting error ( A non-blocking socket operation could not be completed immediately )
how can i slove this problem
modified on Friday, July 1, 2011 6:29 AM
|
|
|
|
|
So, what is the question?
|
|
|
|
|
when calling remote function iam getting an exception A non-blocking socket operation could not be completed immediately. how can i slove this problem
|
|
|
|
|
This could be a timeout, because the server application needs too long for its answer. It could also be a sporadic network problem which your client application doesn't handle. But your question is too incomplete to give a better answer.
This statement is false.
|
|
|
|
|
Hello.
Am not sure about this, hope someone can provide a little help.
I've got a folder with a variety of pre-defined Crystal Reports which will need to be instantiated depending on some user input. This folder is not part of the solution, it's just sitting on a server drive.
So assuming the input is rptTest, I need to instantiate the report called rptTest. If the app can't find a match, it alerts the user.
Is it Activator.CreateInstance I need to accomplish this or is it simply not possible? If it is, can anyone provide a code sample. I know I need an assemblyname and a typename for one but which would be the user input and what would the other be?
Hope I'm being clear and that someone can help.
Thanks in advance
|
|
|
|
|
Activator.CreateInstance is used to create instances of C#/.Net types at runtime. This allows you to switch which class gets created based on runtime information (user input or information provided by virtual methods, for example).
abstract class A {}
class B : A {}
class C : A {}
A CreateSomething(string classname){
return Activator.CreateInstance(Type.GetType(classname));
}
A CreateSomethingOfTheSameType(A template){
return Activator.CreateInstance(template.GetType());
}
I don't believe Crystal Reports are saved as .Net classes and thus this won't be the correct approach. I would imagine that Crystal allows you to load reports from file.
|
|
|
|
|
Here's what I use:
System.IO.FileInfo Defile
...
CrystalDecisions.CrystalReports.Engine.ReportDocument crRpt =
new CrystalDecisions.CrystalReports.Engine.ReportDocument() ;
crRpt.Load ( Defile.FullName ) ;
|
|
|
|
|
Thanks for the answers guys, much appreciated.
Just one more thing, is there a way I can instantiate a custom dataset on the fly as well. Similar to the crystal reports, I've another folder which contains XSDs to use as the datasources for the reports. Could they also be generated according to user input?
Thanks again for your help so far.
|
|
|
|
|
You can construct a DataSet manually at runtime (adding tables, columns, rows etc), or you can use DataSet.ReadXml.
|
|
|
|
|
You, Sir, are a very good man.
I forgot totally about calling the ReadXml method, saves me from having to turn everything into an XSD and can simply populate the crystal report using it instead.
Bob for President.
|
|
|
|
|
Hi,
how can I retrieve values from a textBox in another screen after the user set / send it
In the first screen, I have a TextBox, mNombre50TextBox, the user fills in the number of tickets they want in the textBox.the sum is displayed (by calculating with jQuery) in another textBox, mTotal50TextBox, and the total bill is in 3th (another) textBox, ,mMontantTextBox...
Here is my code in aspx (Front end)
<script type="text/javascript">
$(document).ready(function () {
$("#<%=mNombre50TextBox.ClientID %>").keyup(function () {
$("#<%=mTotal50TextBox.ClientID %>").attr("value", $("#<%=mNombre50TextBox.ClientID %>").attr("value") * 50);
$("#<%=mMontantTextBox.ClientID %>").attr("value", $("#<%=mTotal50TextBox.ClientID %>").attr("value"));
});
$("#<%=mNombre100donnerTextBox.ClientID %>").keyup(function () {
$("#<%=mTotal100donnerTextBox.ClientID %>").attr("value", $("#<%=mNombre100donnerTextBox.ClientID %>").attr("value") * 100);
$("#<%=mMontantTextBox.ClientID %>").attr("value", parseInt($("#<%=mTotal50TextBox.ClientID %>").attr("value")) + parseInt($("#<%=mTotal100donnerTextBox.ClientID %>").attr("value")));
});
});
</script>
<div class="conteneur_lbl">
<div class="lbl">
<asp:Label ID="billets50" runat="server">Nombre de billet(s) à 50 $ :</asp:Label>
</div>
<div class="nmbr_txtbox">
<asp:TextBox ID="mNombre50TextBox" Text="0" runat="server" MaxLength="3" Width="35px"></asp:TextBox>
</div>
<div class="dollars_txtbx">
somme partielle :
<asp:TextBox ID="mTotal50TextBox" runat="server" Text="0" MaxLength="6" ReadOnly="True"></asp:TextBox><span
class="pour_cent_dollars">,00$ </span>
</div>
</div>
<div class="conteneur_lbl">
<div class="lbl">
<asp:Label ID="billets100donner" runat="server">Nombre de billet(s) à donner à 100 $ :</asp:Label>
</div>
<div class="nmbr_txtbox">
<asp:TextBox ID="mNombre100donnerTextBox" Text="0" runat="server" MaxLength="3" Width="35px"></asp:TextBox>
</div>
<div class="dollars_txtbx">
somme partielle :
<asp:TextBox ID="mTotal100donnerTextBox" Text="0" runat="server" MaxLength="6" ReadOnly="True"></asp:TextBox><span
class="pour_cent_dollars">,00$ </span>
</div>
</div>
<div class="conteneur_lbl">
<div class="lbl">
<asp:Label ID="OfferLabel" runat="server">Montant total :</asp:Label>
</div>
<div class="txtbx">
<asp:TextBox ID="mMontantTextBox" runat="server" ReadOnly="True"></asp:TextBox>
,00$
</div>
</div>
Then (when the user clicks a button), the information is backuped for the following screen:
Here is my code in codebehind C#
private void SetPageState()
{
mFormulairePageState.MontantContribution = mMontantTextBox.Text;
SavePageState();
}
public struct FormulairePageState
{
public int SelectedIndex;
public string MontantContribution;
}
In the second screen, I display the sum in a "Label", mPriceLabel,!
Here is my code in codebehind C#
private void LoadLabels()
{
object FormulairePageState = Session["FormulairePage"];
cost = s.MontantContribution;
double doubleVal = 0.0;
if (Double.TryParse(cost, out doubleVal))
{
newVal = (int)doubleVal * 100;
mPriceLabel.Text = newVal.ToString();
}
But in my label, mPriceLabel, there is nothing, it is empty. Comemnt I can display the sum in this screen ?
I did a test on my first screen: I removed "[ReadOnly="True"]" in my TextBox "mMontantTextBox"... Then I typed the numbers directly in the textBox, mMontantTextBox. In this case, these values are displayed in the label on the second screen!
Could you help me, please : Comemnt I can display the sum in 2sd screen ?
|
|
|
|
|
This really should have been placed in the ASP.NET forum
Where is this being set? Session["FormulairePage"]
I know the language. I've read a book. - _Madmatt
|
|
|
|