I think my problem is a little more basic than this! I have been looking at examples all weekend and I still havent found a solution.
I wish to display a list of files in a directory, in a specific column in a datagrid. The BoundColumn class only allows you to bind a datafield to it. As I only have a StringCollection containing the names of the files in the directory I cannot bind using a datafield. I can get the filenames to display in the datagrid by simply binding the datagrid to the StringCollection and setting AutoGenerateColumns to True, but this method does not allow me to format my grid (as far as I can see). So in essence what I want is 1 datagrid with; 1 a col containg checkboxes 2 a boundcol containing the filename 3 a col displaying an image dependent on the file extension 4 a col displaying a hyperlink to perform some actions on the file is this possible? I feel it should be quite simple to achieve but I cannot find a solution anywhere. All help appreciated, cron�n --- Howard Cheng <[EMAIL PROTECTED]> wrote: > Every item in a StringCollection should be a string, > I think you can > just do <%# (string) Container.DataItem %> (C#). If > you're using VB > without Option Strict, you don't have to cast it, > otherwise cast it with > DirectCast(). > > cronan gogarty wrote: > > Hi All, > > > > I am trying to bind data to a particular column in > my > > datagrid. All the examples I have found on the web > > show databinding from database results. > > I am trying to bind a StringCollection to my > column. > > Has anyone ever attempted this before? > > > > Any help greatly appreciated, > > > > cron�n > > -- > :::::::::::::::::::::::::::::: > Howard Cheng > http://www.howcheng.com/ > Wise-cracking quote goes here. > > ____ � The WDVL Discussion List from WDVL.COM � ____ > To Join wdvltalk, Send An Email To: > mailto:[EMAIL PROTECTED] > Send Your Posts To: [EMAIL PROTECTED] > To set a personal password send an email to > [EMAIL PROTECTED] with the words: "set WDVLTALK > pw=yourpassword" in the body of the email. > To change subscription settings to the wdvltalk > digest version: > http://wdvl.internet.com/WDVL/Forum/#sub > > ________________ http://www.wdvl.com > _______________________ > > You are currently subscribed to wdvltalk as: > [EMAIL PROTECTED] > To unsubscribe send a blank email to > %%email.unsub%% > > To unsubscribe via postal mail, please contact us > at: > Jupitermedia Corp. > Attn: Discussion List Management > 475 Park Avenue South > New York, NY 10016 > > Please include the email address which you have been > contacted with. > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.
