Showing posts with label columns. Show all posts
Showing posts with label columns. Show all posts

Saturday, March 24, 2012

PLEASE HELP ASP.NET PROBLEM

Dear All,

I have encountered a very strange problem with DataBinding a repeater.

1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk

Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick

"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?

PLEASE HELP ASP.NET PROBLEM

Dear All,
I have encountered a very strange problem with DataBinding a repeater.
1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk
Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick
"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?
>

Please Help Datagrid Columns

I have a table called Computers with 8 colunms.

I have a select query that list out the Computer brand and the price.
what I want is that when I click on the computer brand then the respective information about this brand will be display in the same page or open a new page. I am using a datagrid, how do I make this work? or should I use other component like table.
Please helpIf you have unique Identifier for the Computerband table use it to create a hyperlink column in the datagrid. then pass the id as querystring. During the postback event read the Id get the details of the brand form from the id and then you can display that in formation in a panel below this grid.

Note;
1. AutoGenerateColumns property must be set to False
2. Manually Create DataGrid columns including the hyperlink column

Ex:


<asp:DataGrid id="dg1" AutoGenerateColumns="False" runat="server">
<asp:HyperLinkColumn Headertext="Brand Id" DataTextField="BrandId" DataNavigationUrlField="BrandId" DataNavigationUrlFormatString="ComputerBrands.aspx?brandId={0}" />
<asp:BoundColumn DataField="ComputerBrandName" HeaderText="Brand Name"/>
<!-- .... add other columns -->
</asp:DataGrid

Thanks
Thank you Jay.

I still have som problem, I create a procedure that reads
Create Proc GetComputerID

@.ComputerID int

as
Select Computer,Price,CPU from Computers
Where ComputerID = @.ComputerID

I do not know where to pass the parameter in the grid, and I could not type computerID={0}
vb.net would not even allow me to run the application
I removed the where claus from my statement. But when I click on the hyperlink, nothing happens.
Here is the ASP code:
<asp:HyperLinkColumn Text="Computer" Target="_self" DataNavigateUrlField="ComputerID" DataNavigateUrlFormatString="UsedComputer.aspx?ComputerId={0}"
DataTextField="Computer" HeaderText="Computer" NavigateUrl="Computer"></asp:HyperLinkColumn>
<asp:BoundColumn DataField="Price" HeaderText="Price"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="ComputerID" HeaderText="ComputerID"></asp:BoundColumn>
</Columns>