Hello
I have a datagridveiw that contains 2 Columns.First column is English(Left To Right) and second column is Farsi(Right To Left).
How can i set datagridview?
Thanks
Please give some more detail of what you want to achieve. You don't "set" a DataGridView. Presumably you want to display some data in the grid, but where is the data coming from? If it's in a DataTable then it's usually as simple as assigning the DataTable to the DataSource property. Otherwise we'd need more information.
Did you change the title of your thread or di I just completely miss the "RightToLeft" before. Anyway, that does sound like a problem that the DataGridView cannot handle by default. I'd think that you'd have to define your own column type and add that behaviour yourself. You inherit the DataGridViewTextBoxColumn and DataGridViewTextBoxCell classes and add the appropriate property and then you'd override the existing functionality that displays the text in a cell. The DataGridViewTextBoxEditingControl class inherits the TextBox class so it already has the ability to display right-to-left. Here are some links that I used to teach myself how to create my own column types. You can learn the principles from them and then adapt them to your own needs. Your case is relatively simple in the grand scheme of things.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.