hi , i have a little problem here , i have a datagridview that has a plenty of rows and all of that rows are filling with persian words like ("مثلا یه چیزی") , when i'm trying to print this datagridview using printPreviewDialog + print document , it show me the words in wrong spelling . that mean if im seen this word ("محمد") in datagridview it'll print it like this one ("دمحم").
it print it inverse . i have used itextsharp and it also dosnt support persian language .
It is printing in reverse the OP's example, "Muhammed" is doing the equivalent of:
"mhmd" is displaying as "dmhd"
I've left the vowels out in the above, as these are written as diacritic marks over/under the main characters for [short] vowels and are customarily left out for most texts. The irony is, I can't speak any other European languages except some schoolboy French and German. Oh and some words in Norwegian, Danish and Dutch are the same as the dialect of English that I speak.
Have you set the RightToLeft property to true? IIRC you will get exactly the problems you describe (the letters being displayed in the reverse order) if you don't. If you can, set the property in the designer, not code.
I'm not sure about the print dialog, the RTL support in winforms is pretty poor.
couple hours ago , i had download the Spire.DataExport components , it work fine ,but i have a littile problem init , when i want to show my datatable Rows in Pdf it Show It Like this ???? like qustion mark , why ?
the language im using is persian and it's very close to Arabic language , the words is sth like this ("محمد کعب") and it show it like this ("???? ???").
even i have set the property of encoding to UTF8 but nothing happend , just gave me a strange words like this (Ù…ØÙ…).
You might be having a problem with two different encoding standards. Windows uses a standard for Arabic called Windows-1256. Farsi might be in the same standard. When it is displayed as UTF8 it displays as you describe, with accented characters. You'll need to either encode as UTF8 from Windows 1256 or just set the encoding to windows 1256.
"update my_table1 set my_time=?, reminder=? where reminder=? ";
Same answer still; you have 3 question-marks in there. That means that a IDbCommand will expect three parameters. It will fail if you only supply 2. From the previous code, it looks as if the primary key is missing.
"Which" record would the statement update? You'll either have to remove the condition (in which case "ALL" records will be updated, which is prolly false) or supply the third parameter.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
The other day I have asked a question about a program which sits in a place where images come and once its started, function is that it updates when a new image is added, I have found a relevant code for this but I would like to know that would this do the desired task which I require. Appreciate any assistance.
//private BaseFuncs theBaseFuncs = new BaseFuncs();
static void Main(string args)
string tt = System.Environment.MachineName;
Foundation.BaseFuncs theFoundation = new BaseFuncs();
//check if filename exists
string checkSql = "select count (id) from images where case_id=" + theBaseFuncs.getCaseIDByCaseNo(caseno) + " and image_name='" + fileItem.Name + "'";
int count = Convert.ToInt16(theBaseFuncs.doSQLScalar(checkSql));
if (count > 0)
//delete image in db - and then normal upload new version
System.Console.Write("Deleting " + fileItem.Name + "in DB");
string delImages = "delete from images where case_id=" + theBaseFuncs.getCaseIDByCaseNo(caseno) + " and image_name='" + fileItem.Name + "'";
Firstly your code is not formatted so it is very difficult to read, please surround it with <pre> tags. Secondly, people here are unlikely to spend time analysing this code for you. Try it yourself to see whether it suits your needs and come back here when you have a more specific question.
One of these days I'm going to think of a really clever signature.
my solution has two project. one is my actual project and another one is setup project. my actual project has one report folder where i store my all ssrs report.i have one folder in setup project called "SSRS_Repor". now i want that when i will do batch build then setup for my project regenerate and then i want to copy all files from report folder of my actual project to SSRS_Repor in my setup project. if i can do this kind of automation of copying files from one location to another folder of my setup project then i could be get rid of manual copying of rdls files. i hard this is possible by setup/deployment projects. i search google for this for details step-by-step instruction but got no good link. so please guide me how can i do it.
i post it to another forum too and some one told me below this
Open or create a setup/deployment project in Visual Studio 2005
Press F4 to display the Properties window
Click on the name of your setup/deployment project in the Solution Explorer
Click on the PostBuildEvent item in the Properties window to cause a button labeled "..." to appear
Click on the "..." button to display the Post-build Event Command Line dialog
Add a command line of your choice in the Post-build event command line text box
Build your project in Visual Studio and verify that the post-build event is executed after the main MSI build
so it is ok but what i need to write for copying files from one location to another location that is not clear to me. so now this is most important for me what to write for copying file during setup generation.
i got another clue like below one. script for setup Pre/Post Build Event but not aware properly. i got a sample like
This command copies a dll with the same name as the project, from the directory where it has been created to a directory called lib under the main solution directory. The /Y suppresses prompts to the user to confirm overwriting existing files. You can check the values of the macro parameters by editing the command and clicking on the Macros >> button.
One of these days I'm going to think of a really clever signature.
we know that a solution can have multiple project. so my solution has got two project like one is my main project and another is setup project.my main project has report folder and setup project has report folder too. now i want to write a script like as example copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll"
which will copy all rdlc files from report folder of my main project to report folder of setup project. can you please give me a right script which will copy all rdlc files from report folder of my main project to report folder of setup project.
so just click on this link http://i.stack.imgur.com/hEZBa.png and you see my project structure and also understand from where i want to copy all rdlc files. thanks
Hello. I am confronting basic polymorphic issue in my small project. Classes Layer1 use classes from Layer2. Here is my design for Layer1
publicclass ChildLayer1 : BaseLayer1
BaseLayer2 base2 = new BaseLayer2();
base2.Function(); // Reaches Here. should go to base class in layer2 as well.
Now overriden function in child class gets called here. But virtual function in base class from Layer2 is not getting called here (hence; in child classes of Layer2 as well) . Here is what I am trying