----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: BrainTeaser Message 1 in Discussion Hello All, I wish to set the datasource of the grid at runtime and also format data in certain columns. I would prefer to do the formating in code instead of retrieving formatted data through query. In order to populate a datagrid I have used a datatable as the datasource. I have tried with three approaches : Initially I add Bound Columns (setting the header, datafield, dataformatstring) at runtime to the datagrid. Then set the datasource and call - datagrid1.databind() This creates 2 columns of each datafield in the grid - one formatted and one unformatted. for eg : "Date" column from the source appears twice in the grid , once with and once without formatting. First I set the datasource and call Datagrid1.databind() Then if I have to format the datagrid, Im unable to set DataFormatString because it is available as the ppty of DataBound column. Adding the bound columns at design time and then at runtime specfying the datasource. But again, I cannot overwrite the DataFormatString of the bound columns at runtime, which is the desired way. Please, if anybody can solve this problem or point out the error in these steps, I'll be truely thankful. Dimpi ----------------------------------------------------------- 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]
