|
|
hello to ALL,
I am using VB 6.0
how can i get the domain Name/IP under which my mahine works,
Let me explain in depth,
suppose my machine is under BHAHBLAH domain then programatically how can i get that doamin Name/IP
please help...any Hint/link ?
thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
i have table named emp
where empid and emp name are the colomns of the table.
now in the vs.2005.
i have taken a dropdown list and label.
in the drop down list i want to show the empid in dropdownlist and based up on the empid the corresponding empname shuld be populate in the label.
can you tell me how to write the code for it in vb.net
|
|
|
|
|
hi Biswa,
on the selected index changed of the DDL u can write this code,
make sure the AutopostBack is true for the DDL
protected void ddEmpID_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
string strEmpName = "SELECT empid,empname FROM tbl_XYZ WHERE empid = '" + ddEmpID.SelectedValue + "'";
SqlCommand comEMP = new SqlCommand(strEmpName, con);
SqlDataReader dr;
con.Open();
dr = comEMP.ExecuteReader();
while (dr.Read())
{
lblEmpName.Text = dr["empname"].ToString();
}
}
catch (Exception ex)
{
Trace.Write(ex.Message);
}
finally
{
con.Close();
}
}
winnie
|
|
|
|
|
if you want to make it as a AJAX based populate u can use AJAX Extensions.. to populate the DDL without a postback
winnie
|
|
|
|
|
hai all,
is there any way to write member function/sub procedures outside of a class declaration as in c++ ?
if its not possible please let me know
thanks
-- modified at 2:52 Thursday 16th August, 2007
|
|
|
|
|
it is not possible honey
Be a part of solution, rather then be a part of problem
|
|
|
|
|
|
Why on earth did you ask this in the VB forum ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Did you even bother to see what forum you posted in?
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Is there a way to determine if the scrollbars(vertical or horizontal) are visible at runtime in a treeview control?
|
|
|
|
|
try the property 'scrollable'
|
|
|
|
|
Nope, tried that. This property allows you to specify to have scrollbars or not to appear (automatically). I want to know when it does appear.
|
|
|
|
|
in that case I would see if you can't use the controlladded event I think the treeview adds the scrollbar control to itself when needed
|
|
|
|
|
ControlAdded event? Is this VB.Net? Unfortunately, I'm on vb6.
|
|
|
|
|
ah it's very wel possible that it is a vb.Net event
unfortanatlly I never programmed in vb6 so I wouldn't know how hou could do this in vb6
perhaps checking the height of the control and comparing it with how many items there are visible multiplied by the itemheight property (if this exists in vb6) could help you but this will be far from perfect also will not work for horizontal bar since there is now itemwidth property (this depends on many factors like fonttype, fontsize, wheter or not the item is a subnode,...)
|
|
|
|
|
Hello all I have a datagrid that i need to loop through the column called TABLE_NAME and use all the cells that end with the word "Data". ANY help is appreciated. I have included a small snippet:
Dim dt As DataTable = acc_connect.GetSchema("tables")
GridView1.DataSource = dt
GridView1.SelectAll()
For Each r As DataGridViewCell In GridView1.SelectedCells
Dim str As String = r.Value.ToString
Dim i As Integer = str.IndexOf("Data")
If Not i = -1 Then
But this in no way works, thanks in advance!!!
|
|
|
|
|
Hi,
zchwllms wrote: But this in no way works
that's not informative; you should explain what it does and how that differs from
what you want, otherwise we have to guess.
There is a String.EdsWith() method that will interest you.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Yes, sorry about that, well as of right now I am getting the column heading as the value and what I is whatever is in the cell on that column.
I was looking for somthing like:
for each r as string in datagridview.column
if r.endswith("Data") then
'the rest of my code will go here
next
thanks again
|
|
|
|
|
Hi,
a DataGridViewCell holds an Object, so the Value property returns that object.
All objects inherit ToString() method from class Object, it simply returns
the type string. So whatever your DGVC is actually holding, you should either
override its ToString() to return real content, or provide (and use) another
way to retrieve its representation (some classes have a GetTect method for this).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thank you for elaborating, I am pretty new to this whole thing.
But my question is still how do I loop through these cells(only in one column) to actually get the content of the cell into a variable string. I understand the logic I am just not sure on how to actually pull the content out of the cell for usage.
thanks,
zach
|
|
|
|
|
Hi,
I haven't used DataGridView myself, here is my best guess:
- DGV has a property called Rows, this holds all the rows, so you can iterate them
with a foreach (DataGridViewRow row in myDGV.Rows) {...}
- a DataGridViewRow has a property called Cells, this holds all the cells of that
row, as in one array; you can apply an index to them as in
row.Cells[i];
- with the above, you could access all the cells that belong to a single column,
provided you now the index of that column. If you have to find out that index,
well DGV has a property called Columns, this holds all the column descriptions
(not the data, just metadata).
I hope and think that would put you on track.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
How about this:
Create a dataview filtering on column TABLE_NAME like %data.
Then just loop through this dataview.
Guy
You always pass failure on the way to success.
|
|
|
|