|
foremorecoast1 wrote: is this achievable?
Yep.
foremorecoast1 wrote: hope its not complex.
It's about a medium level of difficulty.
foremorecoast1 wrote: I did post this question lots of time but i am not getting any response.
Your not getting a response because you weren't listening the first 8 times you asked the same question.
I'll say it again. Get a table containing the UNIQUE ID's in your dataset. Then get a table containing all the records using those ID's. Now, how about a little pseudo-code:
For Each ID in the table
Create a new DataView object on that table, filtering by that ID number
Create a new webchart control and place it where you need it in the web page
Bind the new DataView to the WebChart control
Next
If you want more information on dynamically creating controls in ASP.NET, a little Google goes a long way. "dynamically create controls in ASP.NET"[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
I did already post my code and explained my problem. I did understand what you said and i did implement it which i posted earlier. my problem is.
------
For Each datarow In dtId.Rows
myView.RowFilter = String.Format("Measure_Id='{0}'", datarow.Item("measure_Id"))
'######## checking if the dataview works #########
MycosChartWeb1.DataSource = myView
MycosChartWeb1.DataBind()
'#checking if we are getting data with test datagrid
'or
'DataGrid1.DataSource = myView
'DataGrid1.DataBind()
Next datarow
------
there are 10 IDs so the loop runs 10 time but myView can only hold one set of data so it only returns the last set of record and binds it to webchart or datagrid but i want to have 10 webcharts created if there is 10IDs hope you understand what i am trying to acheive. or if you think there is any webcharting tool which can fix my problem happy to buy that.
thanks
Bikash
|
|
|
|
|
I refer you back to the pseudo-code in this[^] post, and the links after it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was tring to get information from the text file but not sucess i wonder maybe is it didnt read the next line...
------
Dim strmw As StreamReader
Dim myInputString As String
Dim filePath As String = Path.GetDirectoryName(Application.ExecutablePath) & "\save\testing.txt"
Dim game As New Form1
Dim x As Integer
Dim respond As MsgBoxResult
Dim name, num As String
Dim position, counter, whoturn As Integer
respond = MsgBox("Load Pervious game ???", MsgBoxStyle.Question + MsgBoxStyle.YesNo)
If respond = MsgBoxResult.Yes Then
strmw = File.OpenText(filePath)
'loop all the player status
num = strmw.ReadLine()
If num = "1" Then
game.Pname1.Text = strmw.ReadLine()
game.PP1.Text = strmw.ReadLine()
game.counter1.Text = strmw.ReadLine()
game.PTurn.Text = strmw.ReadLine() 'get whos turn
ElseIf num = "2" Then
game.Pname1.Text = strmw.ReadLine()
game.PP1.Text = strmw.ReadLine()
game.counter1.Text = strmw.ReadLine()
game.Pname2.Text = strmw.ReadLine()
game.PP2.Text = strmw.ReadLine()
game.counter2.Text = strmw.ReadLine()
game.PTurn.Text = strmw.ReadLine() 'get whos turn
ElseIf num = "3" Then
game.Pname1.Text = strmw.ReadLine()
game.PP1.Text = strmw.ReadLine()
game.counter1.Text = strmw.ReadLine()
game.Pname2.Text = strmw.ReadLine()
game.PP2.Text = strmw.ReadLine()
game.counter2.Text = strmw.ReadLine()
game.Pname3.Text = strmw.ReadLine()
game.PP3.Text = strmw.ReadLine()
game.counter3.Text = strmw.ReadLine()
game.PTurn.Text = strmw.ReadLine() 'get whos turn
ElseIf num = "4" Then
game.Pname1.Text = strmw.ReadLine()
game.PP1.Text = strmw.ReadLine()
game.counter1.Text = strmw.ReadLine()
game.Pname2.Text = strmw.ReadLine()
game.PP2.Text = strmw.ReadLine()
game.counter2.Text = strmw.ReadLine()
game.Pname3.Text = strmw.ReadLine()
game.PP3.Text = strmw.ReadLine()
game.counter3.Text = strmw.ReadLine()
game.Pname4.Text = strmw.ReadLine()
game.PP4.Text = strmw.ReadLine()
game.counter4.Text = strmw.ReadLine()
game.PTurn.Text = strmw.ReadLine() 'get whos turn
End If
strmw.Close()
MsgBox("Loading sucess", MsgBoxStyle.OKOnly)
game.Show()
Me.Hide()
Else : Exit Sub
End If
End Sub
|
|
|
|
|
This is a mess. There's no way anyone can tell you if you read a particular line based on this, without seeing the file format. Even then, 'not sucess' is not very descriptive. What's going wrong ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
how to read next line?
vb.net
is .txt file
i want to read those line deatail and pass to the label.
i jsut have to make it read accroding wat my coding then will be ok, casue i know how i save the file in the txt file.
example:
3
1
namea
10
2
|
|
|
|
|
You're reading the next line in your code. I don't understand the question. What's going wrong with the code you have ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
oh ic.. i dunno whether my code have error when it run is smooth but the label just didnt show anything, like it didnt have any information, i check the txt.file which have contain inside...hmm
|
|
|
|
|
If you go to the top of your code and press F9, you will set a break point. Then when you press F5 to run your code, it will stop at the break point and you can step through the code to see what is happening.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have notice a problem where the system only read the first line, only the first line was read and pass to the system but it pass to the last line of my code which is
game.PTurn.Text = strmw.ReadLine()
the whole coding for like this
If num = "1" Then
game.Pname1.Text = strmw.ReadLine()
game.PP1.Text = strmw.ReadLine()
game.counter1.Text = strmw.ReadLine()
game.PTurn.Text = strmw.ReadLine()
|
|
|
|
|
lol you have compicated it isnt it battter that u use "For" and "Next"?
or "Substring"?
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
then use substring in timer with interval (1) .... its fast :->
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
it will even worse cause the problem is with the hardware memory
|
|
|
|
|
If you had a hardware problem with the memory, your code, not to mention Windows wouldn't even run. Ever hear of the Blue Screen of Death?? That's what you get when you have hardware RAM problems...
Look, your code is a total mess and now your making up reasons, that you don't understand yourself, for why your doing it the hard way.
I showed you how to store player information in an array of class objects and how to serialize that array out to an XML file and read it back in. The biggest problem you have right now is that you don't understand how to represent and store your games data properly. Storing your games data in a bunch of TextBoxes is NOT the way to do it. The user interface you put on that form should only be used to display the current game state that you have stored. The controls, and the code behind them, should be used to tell your game how to manipulate the game state. The should NOT be used to store the actual data!!!
By NOT storing your game's data in a well thought-out structure, that has no dependancy on user controls what-so-ever, your actually making the rest of the game 100 times harder to write, and more importantly, 100 times harder to support!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
oh is it i dunno that my friend r telling me i have less ram cause low memory problem.
y i still want to find other solution cause i still havent figure out how the xml u told me.
ACtually i had already to store the data in the text file which when i check the file it was in there, and now i want to retrieve all the information and show it on the textbox, and i'm not sotring the data in the TEXTBOX because when exit the system everything sure will gone.
|
|
|
|
|
campbells wrote: my friend r telling me i have less ram cause low memory problem.
Entirely possible, but this has nothing to do with your problem. Actually, the way your doing it now uses more memory than doing it properly, but it's only by maybe 1-2K Bytes...
campbells wrote: i still want to find other solution cause i still havent figure out how the xml u told me
I practically wrote the bloody thing for you. Your biggest problem is how you represent data inside your application.
campbells wrote: now i want to retrieve all the information
How you wrote the file in the first place is what's making it such a pain in the a$$ to read it back in!!!
campbells wrote: and i'm not sotring the data in the TEXTBOX because when exit the system everything sure will gone
You don't have a single clue about what you're doing, do you?? I highly suggest picking up a beginners book on VB.NET. Save yourself 3 more months of beating your head against a wall getting this to work. Learn to do it the correct way from the start. Right now, you've got much bigger problems than just how to read a text file...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i dunno is it i make it hard to read or not, casue my concept is that when i able to write it then just read in line by line. cause i know wats the line going to be. i know the first line going to repsent wat data so i make it as read the second line as playername.text , which i bring the information into the box. Maybe the way i think is simple , casue normally we refer the
playerEnterName.text= Playername.text
so i do the same way, casue the maximum data i need to save is only 4 player.
maybe i think it in toooo simple way which the computer might too hard to udnerstand then.
And i only have short 1 day left to finish it..unable to take 3 month to do it...
|
|
|
|
|
campbells wrote: Maybe the way i think is simple
If it was so simple, why are you here asking how to make it work?
campbells wrote: And i only have short 1 day left to finish it..unable to take 3 month to do it...
Done correctly, you could have done it in 3 minutes. But, ahh, the truth finally comes out. This is homework, isn't it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
campbells wrote: cause i know wats the line going to be
No, you code EXPECTS the first line to represent a certain value. It does not, and cannot, KNOW the the first line is exactly whe you expect it to be. If there is a single mistake or an extra linefeed in the file, your code will, at worst crash, and at best load the wrong data in the wrong fields, because it's totally intolerant of any mistakes in the data file. Do you absolutely KNOW that no-one will edit the data file?? No, you don't, and you can't possibly stop it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ohh~ i solve the problem!! is nothing wrong with my code but is my label set to visible false when my form load so i cant see anything hahahah :P
is not homework is my project i doing a game system only left the save and load function wuu now done.. Thanks for u time anyway , i think the xml things will good for my future when i work since lot of projec use that..will learn that after my school...
|
|
|
|
|
Hello!
I've got a small problem with textboxes..
There are 4 text boxes on my form.
When the program has started the cursor always blinks in one of the four textboxes.
But I want the textboxes to display a value (at first) and not to enter one.
How can I prevent the blinking cursor to be set to a textbox??
Thanks in advance..
|
|
|
|
|
Textboxes are meant for the input of text data and the active one will always show a cursor.
If you don't want this and the user does not need to input any text then change the TextBox controls to Labels.
If the user must enter text at some stage then you can move the focus to another (non-TextBox) control - but the user could still move the focus back to a textbox and the cursor will reappear.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
-- modified at 22:03 Sunday 26th March, 2006
-- spell checked
|
|
|
|
|
Hi Yomam,
U can try locking the textbox after displaying the value.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
Hello everyone. I am trying to create a simple sudoku generator.
I have decided to use textfields.
so far i have made the generation code but what i get stuck on is how to get spaces (blanks) and how to get the solution matrix so that the numbers cant be the same in horizontal and vertical rows and the 3x3 boxes.
i am using really simple code because i am still leaning the program but i am making this as a school project
i would be really glad if i got some help in this
~Solid Snake~
|
|
|
|
|
Use arrays to manipulate matrix.
|
|
|
|