Click here to Skip to main content
15,912,756 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDoubt in Session and Cookies Pin
ChennaiBabu21-Jun-06 21:50
ChennaiBabu21-Jun-06 21:50 
AnswerRe: Doubt in Session and Cookies Pin
Paddy Boyd21-Jun-06 23:26
Paddy Boyd21-Jun-06 23:26 
AnswerRe: Doubt in Session and Cookies Pin
Guffa22-Jun-06 1:22
Guffa22-Jun-06 1:22 
Questiondynamically create a webchart within a repeater control. Pin
uglyeyes21-Jun-06 21:04
uglyeyes21-Jun-06 21:04 
AnswerRe: dynamically create a webchart within a repeater control. Pin
minhpc_bk22-Jun-06 0:47
minhpc_bk22-Jun-06 0:47 
GeneralRe: dynamically create a webchart within a repeater control. Pin
uglyeyes22-Jun-06 17:08
uglyeyes22-Jun-06 17:08 
GeneralRe: dynamically create a webchart within a repeater control. Pin
minhpc_bk22-Jun-06 20:06
minhpc_bk22-Jun-06 20:06 
GeneralRe: dynamically create a webchart within a repeater control. Pin
uglyeyes25-Jun-06 21:07
uglyeyes25-Jun-06 21:07 
I tried to use dotnetcharting and few others but it seems that its not rendering is there sumthing i am doing wrong.

from my previous post my output are (without chart)
------------------------------------------------
1


1.1.1.1
2001/02 95 95
2002/03 95 94
2003/04 95 94
2004/05 90 93.05
2005/06 H1 90 93.8
2005/06 H2 90 0

1.1.1.2
2001/02 100 99
2002/03 100 100
2003/04 100 100
2004/05 100 100
2005/06 Q1 100 100
2005/06 Q2 100 0
2005/06 Q3 100 0
2005/06 Q4 100 0

2


1.1.10.1
2001/02 90 91
2002/03 90 91
2003/04 90 92.5
2004/05 90 92.65
2005/06 H1 90 94
2005/06 H2 90 0
-------------------------------

my aspx code
----------------------------------
<form id="Form1" method="post" runat="server">
<asp:repeater id="myRepeater" runat="server" OnItemDataBound="myRepeater_ItemDataBound">
<ItemTemplate>
<h3><%#DataBinder.Eval(Container.DataItem, "ScoreCardId")%></h3>
<br />
<asp:repeater id="NestedRepeater" runat="server" OnItemDataBound="nestedRepeater_ItemDataBound">
<ItemTemplate>
<h4><%#DataBinder.Eval(Container.DataItem,"Measure_ID")%></h4>
<table>
<asp:Repeater id="SubNestedRepeater" Runat="server">
<ItemTemplate>
<tr><td><asp:PlaceHolder ID="placeholder" Runat="server"></asp:PlaceHolder></td></tr>
</ItemTemplate>
</asp:Repeater>
</table>
</ItemTemplate>
</asp:repeater>
</ItemTemplate>
</asp:repeater>
</form>
---------------------------

my VB code with dotnetcharting integration
-----------------------------

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
objConn = New SqlConnection(dbPath)
cmd = New SqlCommand("select Distinct(ScoreCardId) from measuredata;", objConn)
Dim sdap As New SqlDataAdapter(cmd)
Dim ds As New DataSet
sdap.Fill(ds)

myRepeater.DataSource = ds
myRepeater.DataBind()
End Sub
Public Sub myRepeater_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
Dim dv As DataRowView = e.Item.DataItem '
If Not (dv Is Nothing) Then
Dim nestedRepeater As Repeater = e.Item.FindControl("NestedRepeater") '

If Not (nestedRepeater Is Nothing) Then
objConn = New SqlConnection(dbPath)
Dim scorecardID As String = dv("ScoreCardId").ToString()
cmd = New SqlCommand("select distinct(Measure_ID) from measuredata where ScoreCardID='" & scorecardID & "'; select * from measuredata where ScoreCardID='" & scorecardID & "'", objConn)
Dim subadap As New SqlDataAdapter(cmd)
Dim subDs As New DataSet
subadap.Fill(subDs)

nestedRepeater.DataSource = subDs
'We need to specify the DataMember as the dataset has 2 tables.
nestedRepeater.DataMember = subDs.Tables(0).TableName
nestedRepeater.DataBind()
End If
End If
End Sub 'myRepeater_ItemDataBound

Public Sub nestedRepeater_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs)
Dim dv As DataRowView = e.Item.DataItem

If Not (dv Is Nothing) Then
Dim subNestedRepeater As Repeater = e.Item.FindControl("SubNestedRepeater")

If Not (subNestedRepeater Is Nothing) Then
Dim Measure_ID As String = dv("Measure_ID").ToString()

'FOR DOTNETCHARTING
'---------------------
Dim nestedRepeater As Repeater = e.Item.Parent
Dim subDs As DataSet = nestedRepeater.DataSource
Dim dataView As DataView = New DataView(subDs.Tables(1))
dataView.RowFilter = "Measure_ID = '" & Measure_ID & "'"

'raw dataview assigned to a repeater
'-------------
'subNestedRepeater.DataSource = dataView ' dv.CreateChildView("NestThemSub")
'subNestedRepeater.DataBind()
'------------------------------------------------------------


'FOR DOTNETCHARTING CHARTING TOOL
'----------------------------

Dim chart As New dotnetCHARTING.Chart

'Set Chart 1 properties
chart.Title = "My Chart 1"
chart.Type = dotnetCHARTING.ChartType.Combo
chart.DefaultSeries.DefaultElement.Transparency = 35
chart.TempDirectory = "temp"
chart.ChartArea.XAxis.Label.Text = "Customers"
chart.Debug = True
chart.TempDirectory = "temp"
chart.Width = Unit.Parse(420)
chart.Height = Unit.Parse(300)


'Adding series programatically
chart.Series.Name = "Item sales"
chart.Series.Data = dataView
chart.SeriesCollection.Add()
Dim i As Integer
For i = 0 To subNestedRepeater.Items.Count - 1
subNestedRepeater.Items(i).FindControl("Placeholder1").Controls.Add(chart)
Next


End If
End If
End Sub
----------------------

If I do this nothing is rendered in subnestedrepeater. please help.

thanks




QuestionLogin User Control Pin
johnprakash21-Jun-06 20:44
johnprakash21-Jun-06 20:44 
AnswerRe: Login User Control Pin
Paddy Boyd22-Jun-06 0:02
Paddy Boyd22-Jun-06 0:02 
JokeRe: Login User Control Pin
_AK_22-Jun-06 0:03
_AK_22-Jun-06 0:03 
GeneralRe: Login User Control Pin
johnprakash22-Jun-06 1:11
johnprakash22-Jun-06 1:11 
GeneralRe: Login User Control Pin
johnprakash22-Jun-06 1:12
johnprakash22-Jun-06 1:12 
QuestionDynamic column in crystal report [modified] Pin
meetbinu200321-Jun-06 19:44
meetbinu200321-Jun-06 19:44 
QuestionBiztalk server Pin
givipi21-Jun-06 19:04
givipi21-Jun-06 19:04 
AnswerRe: Biztalk server Pin
minhpc_bk21-Jun-06 19:46
minhpc_bk21-Jun-06 19:46 
QuestionPlz help ?problem in dropdownlist [modified] Pin
nabeelkhan21-Jun-06 18:32
nabeelkhan21-Jun-06 18:32 
AnswerRe: Plz help ?problem in dropdownlist Pin
_AK_21-Jun-06 18:58
_AK_21-Jun-06 18:58 
GeneralRe: Plz help ?problem in dropdownlist Pin
nabeelkhan21-Jun-06 19:13
nabeelkhan21-Jun-06 19:13 
GeneralRe: Plz help ?problem in dropdownlist [modified] Pin
nabeelkhan21-Jun-06 19:21
nabeelkhan21-Jun-06 19:21 
GeneralRe: Plz help ?problem in dropdownlist Pin
_AK_21-Jun-06 19:25
_AK_21-Jun-06 19:25 
GeneralRe: Plz help ?problem in dropdownlist [modified] Pin
nabeelkhan21-Jun-06 19:31
nabeelkhan21-Jun-06 19:31 
GeneralRe: Plz help ?problem in dropdownlist Pin
_AK_21-Jun-06 19:39
_AK_21-Jun-06 19:39 
GeneralRe: Plz help ?problem in dropdownlist Pin
nabeelkhan21-Jun-06 19:51
nabeelkhan21-Jun-06 19:51 
GeneralRe: Plz help ?problem in dropdownlist Pin
_AK_21-Jun-06 21:36
_AK_21-Jun-06 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.