Traversing a DataGrid

Results 1 to 2 of 2

Thread: Traversing a DataGrid

  1. #1
    Join Date
    Dec 1969

    Default Traversing a DataGrid

    Hi,<BR><BR>I have used a DataGrid to display a Shopping Basket. I have one of the columns set as a textbox. I have no trouble retrieving the info from the database but I have a bit of a problem when I want to push the changed data (i.e. changed quantity values) back to the source DB.<BR><BR>I have seen many e.g&#039;s of code traversing an individual row of a datagrid, but what I need to do is, loop through every row, collecting changed quantity values and push them back to the source database.<BR><BR>Has anybody done this kind of thing?<BR><BR>Regards<BR>Paul

  2. #2
    Join Date
    Dec 1969

    Default RE: Traversing a DataGrid

    hi,<BR><BR>i have a sugesstion,<BR><BR>if u feel it is good just check out,<BR><BR><BR><BR>For i = 0 To FlasDataGrid.Items.Count - 1<BR> txtValue= CType(FlasDataGrid.Items(i).Cells(3).FindControl(" fla"), HtmlInputtext)<BR> txtValue.text="&#060;your text box value&#062;"<BR>next<BR><BR>In the above code <BR><BR>In "FindControl("fla")", "fla" is the id of your text box, this is for getting value from the entered text box.<BR><BR>with in the above for loop <BR><BR>For example:- "FlasDataGrid.Items(i).Cells(1).text" using this u will get the database ID,<BR>in which the record has to update.inside call database query function.<BR>This will update each record in the database<BR><BR>The same thing i am doing in uploading files,it is working fine<BR>hope this will help u..<BR><BR>regards<BR>yesu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts