|
Doncha just luuuv office politics?
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.”
|
|
|
|
|
Henry Minute wrote: Doncha just luuuv office politics?
I just wonder why the Dutch don't trust the Belgians?
|
|
|
|
|
This might all seem very funny, I know, but it doesn't solve my problem....
Concerning the chairman, A request has been sent by my manager.
But this might take a while to achieve (office / political war between Belgium / Netherlands).
The main reason why the Netherlands are unwilling to release information, is that they were formerly the only group that maintained all the ICT infrastructure for the whole Benelux company group.
However, since the beginning of 2009, Belgium and Luxemburg splitted from the Netherlands, and created their own ICT division.
I think it's some sort of Job Protection...
Politics, money, it's all involved.
And it's - excuse my language - a real pain in the ass...
|
|
|
|
|
Dimitri Backaert wrote: This doesn't work however, I seem to be stuck at the logon page. I'm not able to pass the user security.
Anyone has an idea?
It would seem that WebClient is not recognizing this page
as an authentication request. You will most likely have to
manually format the correct response and send it to the server.
I would use "WireShark" to trace a manual session with the server. This should let you see what the server expects for
an authentication response.
James Johnson
|
|
|
|
|
James,
Thank you for your answer.
This could do the trick.
I'll try it out.
I already was thinking about changing the HttpWebRequest in another method, because in my opinion a WebRequest is the equivalent of a GET.
What I need is a POST, so I'm thinking of using an HttpWebResponse...
|
|
|
|
|
Suppose I have a business object '`obj1`' that has property '`P`'.
Let's also assume that I have a list of business objects: '`List<BussObj> list`' and each BussObj object contains 2 properties: '`A`' and '`B`'.
This list is bound to combobox: `combobox.ItemsSource = list;`.
I would like to specify binding (in C# code) that would bind combobox.SelectedItem.B to my obj.P. How to do it?
I tried something like that but it does not work:
Binding bind= new Binding("B");
bind.Source = obj.P;
comboSubject.SetBinding(ComboBox.SelectedItemProperty, bind);
Thank you in advance for any help
|
|
|
|
|
Hello,
I am Developing a C# WINDOWS application. In my Application i need to call a cpp dll which returns the list of Drives
connected to the PC.
The Function is "int GetDeviceDiskName(char**);". I can get all the drive names in my vc++ application after i call this
function.
char *device[10];
for(int i = 0; i < 10; i++)
{
device[i] = new char[10];
memset(device[i],0,10);
}
int nRes = GetDeviceDiskName(device);
device returns all the USB's attached to the PC.
But I have Trobule calling this function in C#.Net.
In my c# code i have declared the function in this manner,
[DllImport("../../Hanlin.dll", SetLastError = true, CharSet = CharSet.Ansi,CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 GetDeviceDiskName(String[] deviceName);
In c# i tried to call this function in this way,
char[] deviceName = new char[10];
int nStatus = GetHanlinDeviceDiskName(ref deviceName);
But I get Error as "Additional information: Attempted to read or write protected memory. This is often an indication that
other memory is corrupt."
Can some one help me how to call this function.
In the Dll file the "device" array will be updated in this way,
if(bDiskFound)
{
device[cnt][0]=cDiskID;
cnt++;
}
modified on Thursday, October 8, 2009 9:09 AM
|
|
|
|
|
Marshaling char** parameters isn't easy, and probably not worthwhile. I would recommend any of three alternatives:
1. implement the functionality directly in C#
2. call an existing native function of a lower level, e.g. dealing with just one device at a time (pass a StringBuilder to be filled)
3. pass a StringBuilder instance with sufficient capacity, and store the device names in there, separated by some character, say a semi-colon; upon return call ToString() and Split(';') on it.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
hi friends
i have a datagridview and i add a column to this datagrid that has a picture(start symbol) i want to write a code that when a user click on the picture in datagridview the picture of that control has been changed
(stop symbol). please tell me a solution and say me what code are usefull for this action
nobody help you...
you have to help you yourself
and this is success way.
modified on Thursday, October 8, 2009 1:32 PM
|
|
|
|
|
hi,
its simple... add following html in the gridview column.
<a href="javascript:void(0);" onclick="ChangePic(this);"><img src="xyz.jpg"/></a>
now add a add following javascript to your page:
function ChangePic(sender)
{
sender.childNodes[0].src="abc.jpg";
}
there are many more ways to do this.
Hope It solves ur problem...
Regards
Atif Ali Bhatti.
|
|
|
|
|
i spoke about a windows application not web application my friend
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Is the column a bound column, or an unbound column.
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.”
|
|
|
|
|
no that is not a bound coloumn
the column is used for showing to user the step of action such as start(show start symbol) or pause(show pause symbol) or stop(show stop symbol)..
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Then handle the CellClick event of the DataGridView :
private Bitmap start = new Bitmap("LocationForImage");
private Bitmap stop = new Bitmap("LocationForImage");
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
DataGridViewImageCell img = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex] as DataGridViewImageCell
if (img != null)
{
if ((bool)img.Tag)
{
img.Value = stop;
img.Tag = false;
}
else
{
img.Value = start;
img.Tag = true;
}
}
}
This assumes that there is only one Image column.
As you initially load the data into the image cells, you must set the Tag property to either true (start image used) or false (stop image used)
I hope that this helps.
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.”
|
|
|
|
|
thank you my friend for your reply
your code run correctly but without any result and the image has not changed.!!!!
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Well I hadn't tested it although there was no reason that it shouldn't work, so I built a test app and it works exactly as I thought.
Here is the code for the entire form:
public partial class ImageColumnTestForm : Form
{
private Bitmap start = ImageCellTest.Properties.Resources.START;
private Bitmap stop = ImageCellTest.Properties.Resources.STOP;
public ImageColumnTestForm()
{
InitializeComponent();
}
private void ImageColumnTestForm_Load(object sender, EventArgs e)
{
DataGridViewRow newRow = null;
DataGridViewTextBoxCell textCell = null;
DataGridViewImageCell imgCell = null;
for (int i = 0; i < 5; i++)
{
newRow = new DataGridViewRow();
textCell = new DataGridViewTextBoxCell();
newRow.Cells.Add(textCell);
imgCell = new DataGridViewImageCell();
newRow.Cells.Add(imgCell);
textCell.Value = "Text " + i.ToString();
imgCell.Value = start;
imgCell.Tag = true;
this.dataGridView1.Rows.Add(newRow);
}
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
DataGridViewImageCell img = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex] as DataGridViewImageCell;
if (img != null)
{
if ((bool)img.Tag)
{
img.Value = stop;
img.Tag = false;
}
else
{
img.Value = start;
img.Tag = true;
}
}
}
}
As you can see I simply copied the CellClick code from my previous reply to you and all that I changed was to add the semi-colon to the first line, as I am sure that you did.
This is just a standard form with a datagridview on it and it works just fine.
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.”
|
|
|
|
|
thank you man
you see i try your code again in new project and work correctly then try to affect your code in main project but not work at all so i decide to create my datagridview and finally work correctly.
i think that the problem was on visual studio not on your code or previose code that i used.
thank you again.
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Hi there,
I've developed a set of custom classes to aid in the printing process. Not reports, or anything databound or table related, just some classes to create and save layouts of printing documents.
What I'm wondering now, is how would I move from some classes, which can only be used in code, to a complete package that employs a designer to do the layout at design time in a designer, almost like the winforms or reports designers I've seen.
At this stage all I have is classes, I'm looking for tips on putting these classes into a package with designer functionality that is incorporated into Visual Studio.
Just some advice on direction or where to find further information would be GREATLY appreciated!
Thanks!
|
|
|
|
|
RobertFall wrote: Just some advice on direction or where to find further information would be GREATLY appreciated!
I think this MSDN site[^] may be what you are looking for.
|
|
|
|
|
I did have a look there, and I am currently labouriously pouring through the topics, was just wondering if someone had done this before and knew which specific articles to read or even of a tutorial that might help?
Thanks Again!
|
|
|
|
|
I just found this[^] here on CP; any good?
|
|
|
|
|
It looks promising! Thanks a lot!
|
|
|
|
|
Hi everybody, I have DataSet which is filled by a database table called "schedule". And I want to compare the values of specific columns that are found in different rows, is possible? If it is, how? Thank you.
|
|
|
|
|
The rows are indexed entries, so you can refer to them by their position. Suppose, for instance, that you want to compare items in the current row and the next row, the following code will do:
DataTable tbl = myDataSet[0];
for (int i = 0; i < tbl.Rows.Count - 1; i++)
{
if (tbl.Rows[i]["myColumn"] == tbl.Rows[i+1]["myColumn"])
{
}
}
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Apart from what has been replied, you can also use the DataTable.Select method. You can specify the column value there and all the rows having that value will be returned. Depends on the scenario, which approach you should go for.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|