|
I found a workaround.
On my client, i made a static route setting my server ip with my proxy as gateway.
Now, all the connection to my server go through a proxy.
|
|
|
|
|
Gr8
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
I have created a DataRowView so:
DataRowView repRow = (DataRowView)guarantorBinding.Current;
How can I get the value of the column "Surname" from the first row in guarantorBinding please?
|
|
|
|
|
I've not got time to test it but if you can cast the first column of the DataRowView as a DataColumn, you can access the ColumnName Property:
<br />
string colName;<br />
DataRowView repRow = (DataRowView)guarantorBinding.Current;<br />
colName = ((DataColumn)repRow[0]).ColumnName;<br />
It definitely isn't definatley
|
|
|
|
|
Many thanks for the reply. Unfortunately, that didn't work for me. Any further input would be much appreciated.
It's one of those annoying things that you sniff around for a while until the correct syntax revelas itself.
|
|
|
|
|
Damn! My first thought was actually that, since this is an object which only represents a row of data within the context of a GridView etc, that it might not actually contain the meta-data... I'll try and have a dig around and see if I can find out for sure.
It definitely isn't definatley
|
|
|
|
|
|
I've used Redgate's .NET Reflector tool to look at the code for DataRowView. The column accessor property looks like this:
<br />
public object this[string property]<br />
{<br />
get<br />
{<br />
DataColumn column = this.dataView.Table.Columns[property];<br />
if (column != null)<br />
{<br />
return this.Row[column, this.RowVersionDefault];<br />
}<br />
if ((this.dataView.Table.DataSet == null) || !this.dataView.Table.DataSet.Relations.Contains(property))<br />
{<br />
throw ExceptionBuilder.PropertyNotFound(property, this.dataView.Table.TableName);<br />
}<br />
return this.CreateChildView(property);<br />
}<br />
set {}<br />
}<br />
so it looks like you can access the column name property from :
<br />
repRow.DataView.Table.Columns[0].ColumnName<br />
I'd really recommend getting a copy of the tool - I've found it useful in loads of situations. It's available for free here[^].
It definitely isn't definatley
|
|
|
|
|
I've just read this message again and think I might have been talking at crossed purposes - I've been looking for a way to access the name of the column rather than the value... To access the column value you'd simply use the accessor method:
<br />
repRow["Surname"].ToString()<br />
This assumes that guarantorBinding.Current is the first line in the collection - is this correct? If not, what sort of object is guarantorBinding? Chances are it will have a 'Rows' collection so you'd access the first row using something like guarantorBinding.Rows[0] .
It definitely isn't definatley
|
|
|
|
|
Many thanks for your reply.
GuarantorBinding is a DataSet DataTable. The current position may not be at 0, and I want to find the value for a column for the row which is at position 0 without changing the current position.
Hope that makes sense ...
|
|
|
|
|
Accessing the row using the indexer won't affect the enumerator (Current is an implementation of the IEnumerable interface) so you can use this without affecting anything the current position.
It definitely isn't definatley
|
|
|
|
|
Ah! I see. It was just me being thick.
Many thanks again for all your input.
|
|
|
|
|
Hi,
In C++ to contact with files we have FILE type but in C# I dont't know how to do that. I can't find any material or document about this problem. Please help me.
Thanks
sm
|
|
|
|
|
Look into the System.IO namespace, particularly the classes that begin with File (File, FileInfo, FileStream).
|
|
|
|
|
you say that as if you have looked.
I cant image you did a search for anything related to files in c# and found nothing!!!
do you need something specific about the file, or from the file?
|
|
|
|
|
|
how can i open project c# by visuel stodio 2005
|
|
|
|
|
|
|
lmao!!! How did you get in this forum? surely that is a more brain draining task!
do you mean open an existing project?
cuz then you can right click the project and select the program to open it with
|
|
|
|
|
From Windows explorer: Double click project or solution file.
From Visual Studio: File > Open Project...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Click on the .sln/.csproj file from explorer or open them from VS.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If you can't work this out, and if you can't work out how to give your question a decent subject line, how did you manage to turn your computer on ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I thought the same.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
First download the VS2005/2008 then open a *.csproj file with VS
|
|
|
|