Need help with populating table control with data from a data set

ASP.NET

    Next

  • 1. How do you compare local and remote versions of a file?
    Hi, Using ASP.NET, how can I compare my local version of a file to a version on the server? Another developer made changes to the file that I am working on and I do not want to lose (well, I sort of do...) his changes. Thanks. AU
  • 2. DropDownList Confirmation
    I have been struggling with this for a while, and have seen lots of related postings, but nothing (as far as I can see) that answers this directly. Im using vb dotnet and have an aspx that has a drop down list. For the selected item in the listbox a number of textboxes are populated from the database. The user can change the data in one or more of these text boxes, after which they should press the button that saves he data if they want to commit those changes. What I want to achieve is that when the user selects a different item in the drop down, the syetm should prompt with a confirmation to ask whether the user wishes to save the changes. If the user selects yes, then the save is run (in the code behind) before moving to the newly selected item in the drop down. If the user selects no then the newly selected item is displayed with no save. I have the code behind that does the save, populates the screen etc. I can get a javascript confirm working, but I cant bring it all together to achieve exactly what I am describing above. Any help would be very gratefully received.
  • 3. Web site needs some back-end processing, looking for best methods!
    I have a VB.NET web application using SQL Server. I need to do weekly and monthly processing on that database that will probably require a couple hours to complete, so having this run in the web application is probably not a good idea. I'd like to keep this all in the VS.NET environment (VB.NET). Should I be using a Windows Service, or a Windows Application? It will be able to run off a config file, changed by a web site admin interface. -Max

Need help with populating table control with data from a data set

Postby Z2c3Nw » Thu, 18 Aug 2005 03:28:16 GMT

Hi,

I don't have much knowledge of the table control. I am basically trying to 
use a table thats populated with data rows from a dataSet but currently 
things aren't working for me.

below is the sample HTML that I have:

<asp:TableRow>
	<asp:TableCell Text="Company" ID="CompanyCode" 
Runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
	<asp:TableCell Text="Paygroup" ID="PaygroupCode" 
Runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
	<asp:TableCell Text="paygroup descr" ID="PaygroupDescr" 
Runat="server"></asp:TableCell>
</asp:TableRow>

------------

In addition, I think I need some VB code to assign the particular data rows 
to the table columns, but I'm not sure of the syntax:

 Table1.ID("Company") = Dr("Company")

Any help would be much appreciated.


Thanks,

Gavin





-- 
You've got to live and learn...

Re: Need help with populating table control with data from a data set

Postby Eliyahu Goldin » Thu, 18 Aug 2005 19:22:21 GMT

Gavin,

If for whatever reason you are not happy with the datagrid that would do all
the work for you, you can use a repeater and setup the itemtemplate to
resemble the table row (<tr>) with the cells (<td>s) bound to the dataset
columns.

Eliyahu





rows



Similar Threads:

1.Need help with populating table control with data from a data

Hi Eliyahu,

Thanks for your help.

Can you please give me an idea of how the syntax would kind of look using a 
"repeater"?

Thanks,

Gavin
P.S.--The reason why I don't want to use a datagrid is because I'm trying to 
put in logic that collapses rows when there are values of zero or null. I 
don't think a datagrid can do this.


"Eliyahu Goldin" wrote:

> Gavin,
> 
> If for whatever reason you are not happy with the datagrid that would do all
> the work for you, you can use a repeater and setup the itemtemplate to
> resemble the table row (<tr>) with the cells (<td>s) bound to the dataset
> columns.
> 
> Eliyahu
> 
> "gg77" < XXXX@XXXXX.COM > wrote in message
> news: XXXX@XXXXX.COM ...
> > Hi,
> >
> > I don't have much knowledge of the table control. I am basically trying to
> > use a table thats populated with data rows from a dataSet but currently
> > things aren't working for me.
> >
> > below is the sample HTML that I have:
> >
> > <asp:TableRow>
> > <asp:TableCell Text="Company" ID="CompanyCode"
> > Runat="server"></asp:TableCell>
> > </asp:TableRow>
> > <asp:TableRow>
> > <asp:TableCell Text="Paygroup" ID="PaygroupCode"
> > Runat="server"></asp:TableCell>
> > </asp:TableRow>
> > <asp:TableRow>
> > <asp:TableCell Text="paygroup descr" ID="PaygroupDescr"
> > Runat="server"></asp:TableCell>
> > </asp:TableRow>
> >
> > ------------
> >
> > In addition, I think I need some VB code to assign the particular data
> rows
> > to the table columns, but I'm not sure of the syntax:
> >
> >  Table1.ID("Company") = Dr("Company")
> >
> > Any help would be much appreciated.
> >
> >
> > Thanks,
> >
> > Gavin
> >
> >
> >
> >
> >
> > -- 
> > You've got to live and learn...
> 
> 
> 

2.need help with using table control & connection to data

Hi,

I don't have much knowledge of the table control. I am basically trying to 
use a table thats populated with data rows from a dataSet but currently 
things aren't working for me.

below is the sample HTML that I have:

<asp:TableRow>
	<asp:TableCell Text="Company" ID="CompanyCode" 
Runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
	<asp:TableCell Text="Paygroup" ID="PaygroupCode" 
Runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
	<asp:TableCell Text="paygroup descr" ID="PaygroupDescr" 
Runat="server"></asp:TableCell>
</asp:TableRow>

------------

In addition, I think I need some VB code but I'm not sure of the syntax:

 Table1.ID("Company") = Dr("Company")

Any help would be much appreciated.


Thanks,

Gavin


-- 
You've got to live and learn...
;)

3.need help populating text boxes with data from sql

theres no errors in my code - but it does nothing at all - its supposed to
be populating text boxes!!
any ideas ? (im am pretty new to all this)

If Not Page.IsPostBack Then

Dim search As String

Dim strConn As String =
"server=Gringotts;uid=sa;pwd=password;database=database"

Dim sql As String = "Select * from table where ID = " + userid.Text.ToString

Dim conn As New System.Data.SqlClient.SqlConnection(strConn)

Dim Cmd As New System.Data.SqlClient.SqlCommand(sql, conn)

Dim objDR As System.Data.sqlclient.SqlDataReader

conn.Open()

objDR = Cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)

While objDR.Read()

'userid.Text = objDR("userid")

surname1.Text = objDR("surname1")

firstname1.Text = objDR("fname1")

Title1 = objDR("title1")

End While

Page.DataBind()

End If


4.Need help populating crystal report with data from dataset

For some reason I'm getting no data populating in my crystal report.  I
built my crystal report off my dataset in my project, and I fill the
dataset when opening the main form, and count the records just to make
sure there is data in the dataset, and then open the form containing my
reportviewer control with the crystal report added to it and it still
shows no data when it opens.  I built my crystal report off the wizard
when right clicking the report layout and choosing Database expert,
then choosing Project data, ADO.NET datasets, and then the table from
my dataset.  Any help would be greatly appreciated, thanks.

5.how to verify the data set filling the right data table

Hi all,

I am now writing 1 stored procedure(sp) which execute 
other 2 sp, therefore result of 2 data set and 2 dataset 
tables.  But how can I ensure the right dataset filling 
the right tables so that .net crystal report can access 
the table's result to generate report.
Please help me, it drive me nearly crazy because I cannot 
generate the subreport.  Please help me.

P.S. I want 2 sp are independent for query.  But just have 
1 key of them can be joined.

Thanks and regards,
Hello

6. can data be retrieved from a data set or do I need to use a da

7. Inserting data from multiple related tables - need help

8. Need Help: Filling HTML table with data in C#



Return to ASP.NET

 

Who is online

Users browsing this forum: No registered users and 94 guest