----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: AjaySingala[Synergetics] Message 5 in Discussion Dimpi, Please find attached a WebForm that I have created to try to resolve your problem of dynamically formatting columns. Note: You will have to change the name of the server to get data from sql server. I am using the Employees table from the NorthWind db. I am only displaying the EmployeeID, BirthDate and HireDate. On the form, there is a "Load" button which loads the data in default format. Note, I am dynamically creating the columns. On the "Toggle" button, I change the format of the dates. One thing to note is that, if you have several columns in your grid and want to change only one or 2 (or more) columns' format dynamically, then you will have to take care of a lot of things and would be better off doing what I have done. Alternatively, you may want to use Columns.RemoveAt() and Columns.AddAt() methods to change the formatting. The only problem here is, you'll have to do this in Page_Load and also take care of certain things in Page_Init (Refer to the help on RemoveAt() in VS.NET for more details). But otherwise, the attached code should do the job. Hope this helps. Regards, Ajay Singala [Synergetics] View Attachment(s): http://groups.msn.com/mumbaiusergroup/_notifications.msnw?type=msg&parent=1&item=2224 ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
