Tq Mr.apeter.
1. If u provide the exact sample, it will be really helpful.
2. I need to open the popup with the fixed HEIGHT, WIDTH and RESIZABLE=no
Expecting ur erlier reply.
With Thanx
Laks.R
Main Topics
Browse All TopicsHi Experts,
Please help me on these questions!!
1. How to generate serial numbers in datalist/repeater template columns. Ex. 1,2,3....
2. How to code to open a popup window in the Hyperlink column, by passing the "ID" value from databinder value.
thanx in advance
Laks.R
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi,
I'm giving in C# syntax. Please convert to VB.NET if ur using. Please let me know if anything else.
1. For Serial No.
1.1 In ASPX file. Place this code.
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 104; LEFT: 88px; POSITION: absolute; TOP: 208px" runat="server" Width="216px" Height="120px">
<Columns >
<asp:TemplateColumn HeaderText="SL.No" >
<ItemTemplate>
<asp:Label ID="sl" Runat=server></asp:Label>
ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
2. Put the below code in Code behind method -------- InitializeComponent()
this.DataGrid1.ItemDataBou
3. Add the below new mothod and member(i) in code behind.
Int32 i = 0;
void Item_bound(Object sender, DataGridItemEventArgs e)
{
if((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType ==
ListItemType.AlternatingIt
e.Item.Cells[0].Text = i.ToString();
i++;
}
4. Add below method in Page Load(), to populate dummy value in DataGrid.
ArrayList list = new ArrayList();
list.Add("A");
list.Add("B");
list.Add("C");
DataGrid1.DataSource = list;
DataGrid1.DataBind();
-Aaron
Hi,
For a repeater do the below.
In code behind, Add a MEMBER for SlNo. It should declared like Below...
protected Int32 i = 1;
and also a Repeater event in code behind to increment this Slno.
void Item_bound1(Object sender, RepeaterItemEventArgs e)
{
i++;
}
And the above method should be mapped in to the repeater control in InitializeComponent() method.
this.Repeater1.ItemDataBou
Now u can place the below label anywhere in your Repeater control in ASPX fine to get the Serial No.
<asp:Repeater id="Repeater1" runat="server" DataSource="<%# list%>">
<ItemTemplate>
<table border=1>
<tr><td>
<asp:Label ID="Label1" Runat="server"><%# i.ToString()%> </asp:Label>
</td></tr>
</table
</ItemTemplate>
</asp:Repeater>
-Aaron
Hi apeter,
Thank u for ur gr8 suggession.
Its working ok in VS.et 2005.
But in VS.net 2003, the last row number is displayed in all rows (ie). if the record count is 5, then 5 is displayed in all rows.
I am in doubt that, after processing the "ItemDatabound" method, it is rendering the data!!!
pls try the final solution!!!
regards
Laks.R
Hi apeter
I am extremely sorry for the late reply.
The mistake is from my side. Yes, i tried two <ItemTemplate> columns in a Datalist/Repeater without care and tried..tried....!!.
After making it to single, it works well.
Thank u for ur kind suggession and replies.
If possible, pls answer me to the second Qtn.
2. How to code to open a popup window in the Hyperlink column, by passing the "ID" value from databinder value.
Thanx and Regards
Laks.R
Business Accounts
Answer for Membership
by: apeterPosted on 2005-05-25 at 01:59:56ID: 14075591
Hi,
?ID=<%# DataBinder.Eval (Container.DataItem, "<place the COLUMN NAME U WANT TO PASS> ") %>" ></asp:HyperLink>
1. When every time a row is binding "OnItemCommand" event is fired. So add a template column for serial number. Find for that control in column one. Then u assign a running serial number to it.
2. Try the below one.
<asp:HyperLink Target=_blank NavigateUrl="yourpage.aspx
-Aaron