my problem is that for some reason, a simple assignment isn't working.
the dataGridView is binded to DB and im trying to assign a value type string to a column of type string
Java
//the initialization of the DataGridView
bindingSourceSchema.DataSource = null;
dgwSchema.Columns["colID"].DataPropertyName = "APP_ID";
dgwSchema.Columns["colName"].DataPropertyName = "DESCRIPTION";
dgwSchema.Columns["colTextbox"].DataPropertyName = "APP_ARGS";
dgwSchema.Columns["colTextbox"].HeaderText = "Parameters";
dgwSchema.Columns["colLink"].DataPropertyName = "APP_PATH";
dgwSchema.Columns["colLink"].HeaderText = "Path";
DataGridViewLinkColumn colLink = (DataGridViewLinkColumn)dgwSchema.Columns["colLink"];
colLink.UseColumnTextForLinkValue = true;
colLink.Text = "Edit";
bindingSourceSchema.DataSource = SchemaDB.GetGenericApps();
.
.
.
//the assignment
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
dgwSchema.CurrentRow.Cells["colLink"].Value = openFileDialog.FileName;
// !! ?? dgwSchema.CurrentRow.Cells["colLink"].Value STAYS with parameter "Edit"
}Thanks
Eyal

Nilanka DharmadasaRank #1,875 · 794 reputationPosted Dec 16, 2009, 10:47 PM EST
The reason is following property is set to true.
colLink.UseColumnTextForLinkValue = true;
Set it to false. Then it will resolve your problem.
If you find my answer useful, please mark 'Do you like this answer' checkbox.
Eyal Lewin18 reputationPosted Dec 16, 2009, 10:56 PM EST
I've thought of it, but if i make it false, so the text is not shown at all in my grid
...