I have found the solution for that whichi is (of course) dir="RTL" as an attribute of the the datagrid. However now I need to dynamically set the dir attribute to LTR (the default so no need to do it explicitly) or TRL. I have have decided to test the locale using System.Threading.Thread.CurrentThread.CurrentUICulture and if it turns out to be an RTL language then set the dir attribute to RTL (is there a better solution?).
Now, I am doing this in the code behind and I'd like to do it for the whole user control (ascx). In my case I have a table as the top most level object (all objects included within the table then should inherit this attribute). So I have tried changing the table to runat=Server and give it an ID so that I can add the attribute in the code behind, and I've declared the table as HtmlTable, but for some reason this doesnt work, rather crashes with an ugly error. Only on another user control where the top most object was a server control such as a asp:panel, did it work properly.
My new question: Can I use the table by turning it into htmltable to do the job as the top most object without having to change it to asp:table ?(since I have a lot of TRs and TDs and I will have to change all of them which is a lot of manual work)
or as an alternative, if I added some other server side object as the top most level object (such as asp:panel), will that be a good alternative, or unnecessarily resource-expensive?
Please advice