|
I have DataGridView1 Tool in this DataGridView having 5 columns.
Two columns are DataGridViewComboBoxColumn and three columns are DataGridViewTextBoxColumn.
My task is two DataGridViewComboBoxColumn1 taken from a data master table1,
DataGridViewComboBoxColumn2 is taken from a data master table2
and anther three DataGridViewTextBoxColumn date from user input in the DataGridView1.
Now I need All these five columns data’s should be saved in new table called transition table1
Is it passable can you help me?
Franics K Antony
modified on Wednesday, August 27, 2008 2:04 AM
|
|
|
|
|
Yes it is Possible.
Make a For Loop from i=0 to gridview.rows.count-1
insert into transition values('"& ctype(gridview.findcontrol("ComboBox1"),DropDownList).selecteditem.text &"','"& ctype(gridview.findcontrol("ComboBox2"),DropDownList).selecteditem.text &"','"& ctype(gridview.findcontrol("TextBox1"),TextBox).Text &"','"& ctype(gridview.findcontrol("TextBox2"),TextBox).Text &"','"& ctype(gridview.findcontrol("TextBox3"),TextBox).Text &"')
Try & if still not working then reply
Darshana Pathak
|
|
|
|
|
Thank you for you code,
But my problem is how to connect more then two table in single DataGridView like a DataGridViewComboBox1 connect one master table1, DataGridViewComboBox2 connect one master table2
at a same time in the two column data’s save in transition table1,
How can I do please help me. This is major problem
Please mail me it is argent
Franics K Antony
|
|
|
|
|
You can bind gridview with query from coding
For e.g.
dim da as OledbDataAdapter
dim dt as new DataTable
dim st as String
'Enter Connection String
dim cn as OledbConnection("")
st="select a.name as Name,b.Address as Address from student a,info b"
da=new OledbDataAdapter(st,cn)
da.fill(dt)
Gridview1.datasource=dt
Gridview1.DataBind()
and while Adding the ComboBox Column in Gridview You can Give DatatextField= Name & DataValueField= Address
Same for ComboBox2 Column
Try if Still Not getting then tell so i can give u my phone no so u can call me.
Darshana Pathak
|
|
|
|
|
What u said was right, but the problem is
In datagridview1 we have 5 columns
Column1-slno
Column2-specification (combobox)
Column3-shape (combobox)
Column4-prize
Column5-remarks
Tables1-t01customerorder
Table2-m01specification
Table03-m02shape
In load event-All above columns are retrieved from transaction table –t01customerorder
If we click new button column2 as get data from Table2-m01specification
And column3 as to get data from Table03-m01shape, after selecting the value from master table
Column1, column4, column5 –user input
Click save button, selected data from master table and user input get saved into Tables1-t01customerorder
Please help me to achieve task
Thank you one’s again
Franics K Antony
|
|
|
|
|
can u tell me that upto which point ur successfully getting the results?
reply so i can give u further hint
Darshana Pathak
|
|
|
|
|
Hi,
I'm using VC6.0 DLL with VB.NET. XYZClient.dll is in the same directory as the VB.NET exe is present. But, still I get this runtime error on some PCs.It works on couple of PC without any issues. I tried on Windows XP as well as 2K. Results are intermittent. Any idea?
In VB, function is decalred as below:
Declare Function XYZOpenConnection Lib "XYZClient.dll" (ByVal IPAddressOrMachineName As String, ByVal usernameOfXYZUserGroup As String, ByVal applicationData As Integer) As Short
Thanks
Vikas
|
|
|
|
|
you can use the dependency viewer to look at the files on which XYZClient.Dll is dependent on.
I guess on some of the machines these files are missing.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Do you need the VC++ redistributable installed on those PCs?
|
|
|
|
|
Actually, I had compiled the VC++ DLL in debug mode and it was the issue. The moment I had release mode DLL. it worked fine.
Thanks
Vikas
|
|
|
|
|
Hi All,
I am able to retrieve datatype of an object or variable like "System.Xml.XmlDocument" or System.String. I want to pass this as System.Type object to another method or function, so that they can know the type, as the other function takes the below parameters
func1(name as String, value as Object, type as System.Type)
Please advice me how can I pass "System.String" as type in to the function.
Thanks,
Aleem Mohammad.
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
indian143 wrote: func1(name as String, value as Object, type as System.Type)
Pass it as type...
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
You can get the type by using
Type t = GetType(System.String)
|
|
|
|
|
Hi,
Yes but I get the type in string format as "System.Double". How can I type cast it as
Type t = GetType("System.Double") is it ok? or any other method. Please help me.
Thanks,
Aleem Mohammad,
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
Hi All,
I got it, its Type.GetType("System.Double").
Thanks to all of you who tried to help. Thanks a lot.
Aleem Mohammad.
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
There is no reason to send the type to the method.
It can use value.GetType() to get the actual type of the parameter, and this also prevents the situation where you send data as one type and the type information to be something different.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
GetType(String)
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Under is some code of C#, i would like all of you to show me how can to VB.net because i don't know C# at all and i don't know this code as well.
Thanks for your help...
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
allStands = new List[] { Stand1plates, Stand2plates, Stand3plates };
// Stand2plates.Add(3);
}
List[] allStands;
List Stand1plates = new List();
List Stand2plates = new List();
List Stand3plates = new List();
private void MoveFromTo(int source, int dest)
{
int top = allStands[source-1][allStands[source-1].Count - 1];
allStands[source - 1].Remove(top);
allStands[dest-1].Add(top);
RedrawPanels();
}
=================================
I change it to VB.net as bellow:
Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
' Stand2plates.Add(3);
allStands = New List() {Stand1plates, Stand2plates, Stand3plates}
End Sub
Private allStands As List(Of Integer)
Private Stand1plates As New List(Of Integer)
Private Stand2plates As New List(Of Integer)
Private Stand3plates As New List(Of Integer)
Private Sub MoveFromTo(ByVal source As Integer, ByVal dest As Integer)
Dim top As Integer = allStands(source - 1)(allStands(source - 1).Count - 1)
allStands(source - 1).Remove(top)
allStands(dest - 1).Add(top)
RedrawPanels()
End Sub
End Sub
but it has error where underline. what's problem ? How do i change it ?
Thanks for your helps.
VB.Net
|
|
|
|
|
Sovann wrote: i don't know C# at all and i don't know this code as well.
God bless you.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
1: next time post the error you get
2: before you post here read the error
to few arguments to ... paints a pretty clear picture of what is wrong
3: to solve this
change 'private allstands as list(of integer)' to 'private allstands as list(of list(of integer))
and in the constructor (public sub new in case you do not know)
put the following:
allStands = New List(Of List(Of Integer))
allStands.Add(Stand1plates)
allStands.Add(Stand2plates)
allStands.Add(Stand3plates)
this should work
|
|
|
|
|
Arrrggghhh! This code won't go away!
|
|
|
|
|
I am working with the macros in Microsoft Project. I come accross some issues while using event handlers. within the open_project event handler, I want to store some "task" information in memory. I will then make changes in project file (by adding, modifying tasks) manually. And within the save_project event handler, I want to use already stored "tasks" information . it seems I'll have to use in-proc dlls for preserving the values and using them whenever required. Can any one please suggest me what to do !
Madni
|
|
|
|
|
Hi,
I need to create a windows application which will have to run in background and will capture the web site address entered by the user in that machine. ie I need to monitor the usage of internet in a machine.
I would like to know the details of the namespace and the method used for capture details of the visited sites.
Thanks
Yesuprakash
Cochin
|
|
|
|
|
|
Hiii
I want to insert new row in data grid view and set the cursor in new inserted rows first cell.
Please suggest.
Thanx
~Khatri Mitesh
|
|
|
|