Forms Data Controls :: Populate Gridview From A Large Text File?

Jan 26, 2011

I have a very large text file whose data I need to extract and display in a gridview control. The method I'm using now is as follow:

1. Read each line of the textfile using StreamReader, into a String.

2. Split the String and populate the fields of a detail object.

3. Add the detail object to a List.

4. Repeat steps 1 to 3 for each row of the text file.

5. Bind the list to the gridview.

I think most of the time is spent processing the text file data (steps 1, 2 & 3).

Is there any way this can be done quicker and more efficiently? At present, it takes ages to read and process a 76 mb text file.

View 7 Replies


Similar Messages:

Data Controls :: Populate GridView Using JQuery AJAX With Large Amount Of Data Not Working

May 7, 2015

I want to bind large amount of data in gridview using jquery but without paging.

I am taking reference from this post

[URL]

But when there is large amount of data, it's not working

View 1 Replies

Forms Data Controls :: Retrieve First Cell Gridview Value To Populate In Text Box?

Dec 2, 2010

I am using VB and trying to get the first value of the cell of a gridview. The gridview is returning a header and 1 value.

In the code behind I have used the below, but the textbox is showing " ". It is not populating the first cell of the gridview databind.

Protected
Sub GridView3_RowDataBound(ByVal
sender As
Object,
ByVal e
As
GridViewRowEventArgs)If
(Not (e.Row.DataItem)
Is
Nothing)
Then
' Set the capacity label text
TextBoxTest.Text = e.Row.Cells(1).Text
End
If
End
Sub

View 5 Replies

Forms Data Controls :: Populate GridView From XML File?

Sep 14, 2010

I am quite a new to the ASP.NET field and trying to populate a gridview with data from xml file. I have already done this using code bihind(C#) when the xml file is simple, like below: Dennys 730 W. Carson St. Torrance CA 90502 5625555555 4 The best burger joint in California! And code bihind: protected void GridView1_PreRender(object sender, EventArgs e) { DataSet ds = new DataSet(); ds.ReadXml(Server.MapPath("RestaurantData.xml")); GridView1.DataSource = ds; GridView1.DataBind(); } But say if I have multiple child of a node in the XML file, say, Dennys 730 W. Carson St.Torrance CA 5625555555 [URL] Then how to load this data(phone & website) in a gridview column using code behind(C#)? And what else I have to do with my aspx page also?

View 3 Replies

Web Forms :: How To Increase Speed To Populate Dropdown List With Large Amount Data

Jan 11, 2010

I have Sql Table for Products that have ~8000 records. In my web form I want use dropdown list to edit code with dropdown list. This drop down list populate very slow. How to increase speed to populate dropdown list with large amount data.

View 1 Replies

Read Large File Size Text File?

Jan 17, 2011

I have a text file with tab as delimiter. There are about 20 fields in the text file and the file size is about 150MB-200MB.

I need to filter out each row in the textfile based on its field criteria, For Eg: the i should ignore the particular row if the Field A is empty.

I know that by reading out the text file row by row it will be certainly slow.

how to read out the text file fast and also how to do the file processing for the read out text file?

View 4 Replies

Forms Data Controls :: Formatting Text Within Large Comment Field Stored In SQL Database?

Jun 15, 2010

I'm using ASP .NET C# 3.5. I have a multiline textbox on my web form that allows for the input of up to 5,000 characters from the end-user. This text is a basic description of a training course. I need to display it out in a clearly formatted way. For example, I need there to be bullets and bold text.

What I did was I chose certain (not often used) characters and then used the .Replace method when displaying the text in an <asp:Label>. If the text in the database contains the character '~' then I replace that with a line break <br />. If it contains '`' I replace that with <b> and if it contains '^' I replace that with </b>.

Is there a better way of doing this? It is working properly, and I'm displaying the text properly, but I know the end-user is going to hate typing text like this for formatting. I do want this all to stay database driven as well

View 4 Replies

Forms Data Controls :: How To Upload Details Or Records On Text File To Gridview

Jun 28, 2010

I want a tutorial or an example showing on how to upload details or records on text file to Gridview.
The way it is with Excel file where we upload to Griview.

View 26 Replies

Forms Data Controls :: Gridview Template File - Get In Templatefield Button Text?

Jul 9, 2010

I make multilanguage website. and i have convert procedure for this. How i get in templatefield button text ???

With GridView1
For Each c In .Columns
If TypeOf (c) Is EditCommandColumn Or TypeOf (c) Is CommandField Then
c.canceltext = convert(c.canceltext, Kullanici_val.language)
c.edittext = convert(c.edittext, Kullanici_val.language)
c.updatetext = convert(c.updatetext, Kullanici_val.language)
c.selecttext = convert(c.selecttext, Kullanici_val.language)
c.deletetext = convert(c.deletetext, Kullanici_val.language)
ElseIf TypeOf (c) Is TemplateField Then
c.text = convert(c.text, Kullanici_val.language)
Else
c.headertext = convert(c.headertext, Kullanici_val.language)
End If
Next
End With............................................

View 2 Replies

Forms Data Controls :: Display Text File Onto Gridview Column, From Sqlserver DB?

Jun 24, 2010

How to populate a gridview column, from sqlserver2005 database table.I've tried this:

Response.BinaryWrite((
byte[])dr["_reportattcmt"]);

But this would display data on to page. but how to do it on to gridview coloumn

View 7 Replies

Forms Data Controls :: Populate Label Text With Conditional Statement?

Jun 29, 2010

I have a gridview with the following Template Field

<asp:TemplateField HeaderText="ADDRESS" SortExpression="CAST#">

View 14 Replies

Data Controls :: Long Text Of Items Causes DropDownList Width To Be Large

Oct 7, 2012

I have a web in asp.net and code in vb and sql database. There is a dropdownlist ina page the length is too big. How can I set to multi row or some other kind....

View 1 Replies

Forms Data Controls :: Large DropDownLists In GridView?

Jan 5, 2010

I have a gridview that is currently showing 20 lines per page. Each line has several fields in it, three of which are dropdownlists. These dropdownlists are populated with a SQLDataSource and then the selected value is bound to one of the gridview datalements.

The problem I'm running into is that the page is very slow to load. I believe this is because of the large dropdownlists (and possibly because there are roughly 60 of them, each of which is executing a SQL query to populate the list of available values). The file size that is being transmitted over the web is just over 1.25MB in size, again from the large amounts of data in the dropdownlists.

Is anyone aware of a technique by which I could only execute the query from the SQLDataSources that populate the dropdownlists' available values once and then reuse the results of that query to populate the relevant dropdowns? Ideally I would do this on the client side so it would also limit the amount of text being transmitted to the client browser.

View 7 Replies

DataSource Controls :: Trying To Import The Data,the Fields Which Have Large Text Are Not Inserted Completly?

Mar 25, 2010

i am developing an application using ASP.NET with C#.Net and SQL SERVER 2005. here i am importing data from excel sheet to database.in my excel sheet some fields have large data.and for those fields i had taken NTEXT as data type in my database.when i am trying to import the data,the fields which have large text are not inserted completly.i.e some data is missing. the field in database accepts the data upto some characters only.what would be the reason for this? and which data type can i use for inserting large data?

View 8 Replies

Forms Data Controls :: Single Click ListView Record To Populate Text Field?

Jul 22, 2010

I have a listview that has been constructed using tables. I have set the DataKeyNames="SomeTextField" among others. This column is currently not visible in the ListView.

I'd like to populate a textbox on the click of any listview record with the contents "SomeTextField" column.

View 6 Replies

Forms Data Controls :: Gridview Display Large Size For A Second

Mar 22, 2010

when i did not have too many controls on the gridview, it was displaying fine. but when i added more controls, it has become very slow and displays a large size for a second or so, and then comes to normal size.

View 1 Replies

Forms Data Controls :: Jerky Scrolling In IE8 Using Large Gridview?

Feb 28, 2011

ASP.NET 3.5,I'm upgrading a page that currently uses classic asp and xslt to display about 2000 readonly tabular records. Please leave aside the issue of whether this is a good idea or not.My asp.net replacement page uses a gridview to do the same thing.The scrolling in IE8 using this old code is very smooth and even. The scrolling using the asp.net page is horribly jerky. I can't figure out why - there doesn't appear to be much client side code running.Any clues welcome as this is a high traffic page that I want to look as good as possible.The same page also can't handle a row highlighter - same reason slow and jerky.

View 2 Replies

Populate Table From Text File?

Oct 1, 2010

new developer here. I'm trying to populate a ASP table dynamically. This is what I'm trying to do.I have table with 1 row and 4 cells. I want to import information from a text file into the various cells. Each line of the text file is what I want to go into each cell.

For example if the text file reads:

Date

Time

Path

User

I want each line to go into each cell. Is this possible, or will I need to create a SQL Server table and read from that?

View 7 Replies

Forms Data Controls :: Populate Dropdownlist In A Gridview By Selecting Another Dropdown In Same Gridview

Oct 9, 2010

How to populate dropdownlist in a gridview by selecting another dropdown in same gridview

i tried the code in driiopdownlist selectedchanged

dropdownlist d=(dropdownlist)gridview.findcontrol("dropdownlist1") but it gives null

View 4 Replies

Forms Data Controls :: Gridview Selections To Populate Another Gridview Or Control With Selection From First

Feb 19, 2010

I currently have a gridview that has 1 column with radiobuttons. I then have a update button to update all the selected records. But what i want to do is add a step before the update. I want to add a multi-line textbox for each radiobutton selected to allow them to add notes/comments for each record before the update occurs.

Because the textbox will be large to allow them to enter the comments, i wanted to list them out seperately per record selected. Maybe a gridview is not what i need for the 2nd part, but thats the scenario and looking for suggestions on what / how to do it.

Example:

GRIDVIEW1

ID column1 column2 column3 radiocolumn
1 1111 2222 3333 Yes / No (selected Yes)
2 2222 3333 4444 Yes / No

GRIDVIEW2

ID NotesColumn
1 Texbox displays here

View 20 Replies

Forms Data Controls :: Populate A Gridview In An Accordion?

Oct 26, 2010

I am trying to fill a gridview inside a repeater and I am getting an error. Firstly, here is my code for the page...

[Code]....

And next is my code....

[Code]....

So basically what happens is, the accordion is populated by a dataset and in turn the gridview is then supposed to populate with data depending on the hidCusType from the parent pane of the accordion.

But I get the following error...

The name 'AccordionItemType' does not exist in the current context on this line...

if (e.ItemType == AccordionItemType.Content)

View 5 Replies

Forms Data Controls :: Populate Gridview Using Xml Web Service?

Nov 12, 2010

How do I populate a gridview calling an XML WebService?

protected void Page_Load(object sender, EventArgs e)
{
var proxy = new myWebService.integration_io();
var xmlResponse = proxy.ProcessClientAction(xmlRequest);
var parsedXmlResponse = XElement.Parse(xmlResponse);

[Code]....

View 15 Replies

Forms Data Controls :: Adding A New Row In A Gridview That Is Already Populate?

Mar 16, 2011

I have a gridview that contains this info below

ID Place (button)

A Newyork

B Boston

now, when the user clicks on the button in the header, I would the gridview to contain an extrarow with blank textboxs which the user can type information in and save that information. So that when the gridview gets shows again, it contains the new information.

View 7 Replies

Data Controls :: Large Number Of Columns In GridView

Mar 7, 2012

I have 65 columns in the grid, if the columns are reduced to 20 then the speed when accessing from client is more or less similar to that accessing from web browser. Does it mean that all this performance issue is due to the data only ???

View 1 Replies

Forms Data Controls :: Populate Gridview When You Select The Dropdownlist?

Jan 20, 2010

I am trying to populate a gridview when you select the dropdownlist.selected value. I don't want to use the sqldatasource or any other datasource. I am trying my best to achieve this, but didn't succeed till now. One of my friend said that i need to get the selected value from dropdownlist and search for the data in the database using the selectedvalue and populate the dataset and bind to the gridview.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved