|
Set the DataSource property for each DataGridView to the corresponding BindingSource
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You need to inject a BindingSource between the DataTable and the DataGridView
oBSClient = new BindingSource
oBSClient .DataSource = myDataSet.Tables("client_details").DefaultView
DataGridView1.DataSource = oBSClient
Then if you are using the same table you can create another BindingSource based on myDataSet.Tables("client_details") and bind that to the second DGV
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It is throwing error as "Null object reference".
|
|
|
|
|
So debug through the code and find out which object is not being instantiated. You did remove the space I inadvertantly left in the declareation right!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have done this :
Dim myDataSet As New DataSet()
Dim newbinding As New BindingSource
newbinding.DataSource = myDataSet.Tables("clinet_details").DefaultView
DataGridView.DataSource = newbinding
while debugging i found following error in the 3rd line above:
"use the "new" keyword to create an object instance".
how to fix this?
|
|
|
|
|
Wich line - presumably when assigning the table which is not populated in this code.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There's this dashboard application that we have, written in VB.NET. I have been given an assignment - to make the dashboard viewable from a web browser. I presume this means creating web forms to replace the Windows Forms. I think I'm pretty good with VB.NET, but I don't know the first thing about web forms. I know some very basic HTML, and I've dabbled with Tomcat & JSP, but I'm not even sure where to start reading up in order to learn what I need to accomplish the task at hand.
Can anyone point me in the right direction?
|
|
|
|
|
Buy a book on ASP.NET. Seriously, you've not going to get the background you need from a couple of forum posts and some badly written tutorials on the web.
|
|
|
|
|
why do Code project MVPs answers only easy questions or only refers books
|
|
|
|
|
You my friend are going to go far, but not as a developer, asking for a crash course in web development and then bitching that 2 MVPs point you at a book is really not the way to go.
People spend years studying and working on web development and you want it in a forum post, you even asked for a "course", what do you think a course is, idiot.
|
|
|
|
|
dont know for whom this post is
|
|
|
|
|
nowords4u wrote: dont know for whom this post is
I thought that was pretty obvious.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Actually, we just answer non-moronic questions. We like being asked hard questions. A question that requires we write a book in response is not hard, it's just lazy.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Blacklisted... Have a nice life.
Your boxx have given you a job to do. Instead of wasting your time bitching about the perfectly reasonable answers you were given, start studying an ASP.NET book. It appears you've wasted two days this weekend waiting for someone to do your research for you.
|
|
|
|
|
i_kant_spel wrote: I have been given an assignment - to make the dashboard viewable from a web browser
Why have you been given this task, if you have no clue how to do it. Does your boss know you don't know how to do it ? Is he an idiot ?
As someone else said, buy an ASP.NET book, your question is way too broad for an online forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I guess i knw How you become the MVP of Code project 60,000 posts hahahhahahaa , lmao
|
|
|
|
|
It's a combination of writing articles, and helping people who ask real questions, as opposed to asking me to do their work for them. In the early days, the site only had real programmers on it. I miss those times.....
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
cool that is a very good answer i can expect from a MVP , i am clear now , i am impressed
|
|
|
|
|
Amusingly, I could care less if you're impressed or not, but thanks all the same.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello agine
I have added a exe to my Project by added a new item and then setting the Build Action to Embedded Resource
now how can i run the exe i have added to my project ???
i try Process.Start and that did not work
Can anyone help plesase
maybe give me a example if it is too much
Thanks
|
|
|
|
|
You have to copy the .EXE to the hard drive and run it from there. You cannot run it from Resources. It must be in file form.
|
|
|
|
|
|
ok i think i got it so i can have my app save me embeded exe run it then when i am done i can delete it
that would work for me
can you help me get started with a example please
Thanks
Bob
|
|
|
|
|
Here you go.
Private Sub StartEmbeddedExe()
Dim currentAssembly As Assembly = Assembly.GetExecutingAssembly()
Dim resourceFullName As String = "YourNamespace.ExecutableName.exe"
Dim filePath As String = Path.Combine(Path.GetTempPath(), resourceFullName)
Using stream As Stream = currentAssembly.GetManifestResourceStream(resourceFullName)
If Not stream Is Nothing Then
Using file As New FileStream(filePath, FileMode.Create)
Dim buffer As Byte() = New Byte(1024) {}
Dim read As Integer = stream.Read(buffer, 0, buffer.Length)
Do While (read > 0)
file.Write(buffer, 0, read)
read = stream.Read(buffer, 0, buffer.Length)
Loop
End Using
End If
End Using
If File.Exists(filePath) Then Process.Start(filePath)
End Sub
|
|
|
|
|
I am getting some not defind for blue lines under
Private Sub StartEmbeddedExe()
Dim currentAssembly As Assemably <= Here = Assembly.GetExecutingAssembly()
Dim resourceFullName As String = "keyboard.exe"
Dim filePath As String = Path.<= Here Combine(Path. <= Here GetTempPath(), resourceFullName)
Using stream As Stream <= Here = currentAssembly.GetManifestResourceStream(resourceFullName)
If Not stream Is Nothing Then
Using file As New FileStream(filePath, FileMode.Create)
Dim buffer As Byte() = New Byte(1024) {}
Dim read As Integer = stream.Read(buffer, 0, buffer.Length)
Do While (read > 0)
file.Write(buffer, 0, read)
read = stream.Read(buffer, 0, buffer.Length)
Loop
End Using
End If
End Using
If File. <= Here Exists(filePath) Then Process.Start(filePath)
End Sub
How can i fix that ??
Thanks
Bob
|
|
|
|