We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Load a Text File....

Hi all, How does one load a text file in this grid? I usually see something like "Grid.LoadText(myfile)" or something like that for a method. All I see with this is LoadBinary but it doesnt seem to work for me. I named my grid something other than the default, however VS2005 wants me to change it to something else. I have this for my import statement: Imports Syncfusion.Windows.Forms.Grid.GridControl Is that correct? Thanks. Tom

4 Replies

ST stanleyj Syncfusion Team June 28, 2006 03:52 PM UTC

Hi Tom, This can be done using the GridModelTextDataExchange class.. Using CopyTextToBuffer, the text can be exported and PasteTextFromBuffer does for the import.. There is also ExportTabDelim and ImportTabDelim where character that is used for separating columns can be declared, default is ''\t''. Here is a VB sample for VS2003 and VS2005, let us know if you have further queries. Regards, Stanley >Hi all, > >How does one load a text file in this grid? > >I usually see something like "Grid.LoadText(myfile)" or something like that for a method. All I see with this is LoadBinary but it doesnt seem to work for me. > >I named my grid something other than the default, however VS2005 wants me to change it to something else. I have this for my import statement: > >Imports Syncfusion.Windows.Forms.Grid.GridControl > >Is that correct? > > >Thanks. > >Tom


AD Administrator Syncfusion Team June 28, 2006 04:38 PM UTC

Ok, it sounds alright and the sample is easy to follow. However I do not see how I can paste a buffer in from a file selected with an open dialog? Its a waste of time to read a file in from a stream when my current grid control simply lets me "GridControl1.Load(myfile,tabtextdel)" without reading the text at all. I also do not see the importtext method in there as well. Any examples of that, that may help me? Thanks. Tom


ST stanleyj Syncfusion Team June 28, 2006 05:39 PM UTC

Hi Tom, Please refer this one.. Regards, Stanley


AD Administrator Syncfusion Team June 28, 2006 06:14 PM UTC

Thanks, That works a bit better, albeit slower than what Im currently using, however I dont have the formul functions for the cells in my current grid component either. Always a little trade off. Thanks again. >Hi Tom, > >Please refer this one.. > >Regards, >Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon