Click here to Skip to main content
15,064,485 members

Comments by Zasky (Top 12 by date)

Zasky 19-Oct-12 11:40am View
   
You're reading the file as unicode, which is probably isn't. That's why the output looks 'encoded'.
Zasky 19-Oct-12 7:06am View
   
Check this out:
client1.Command.Parameters.Add("@id", SqlDbType.Int).Value = GridView9.SelectedRow.Cells[1];
Does that give the value you expect?
Maybe try "... = Int32.Parse(GridView9.SelectedRow.Cells[1].Text);"
Zasky 25-May-12 9:32am View
   
Fair enough, but as it's not clear what 'the range of hundred' means I went for the simplest solution. A range of a hundred doesn't indicate the upper and lower bounds. Okay, it probably meant 0-100, but I'm sure OP can handle a condition statement.
Zasky 13-Mar-12 10:29am View
   
How is m_CodeAgence declared?
Zasky 12-Mar-12 8:08am View
   
Well, you've made assumptions there. The question says 'a' submit button, so there may be other buttons and, although a data entry form generally has 1 submit button it may not always be so.
DialogResult is just a public property much like any other and if you're assumptions are correct then it would be sensible to use it. I'm not sure what you mean by having many public DialogResult properties. Perhaps you mean that my property could be a DialogResult enum intead of bool? That would be fine but no better than bool in my opinion. This solution just provides another approach which may (or may not!) be a better fit.
Zasky 12-Mar-12 7:32am View
   
Because the dialog result may not be the same. Something could be submitted within the child form, but the user may not want to ok the form. I don't know how the form is meant to behave, do you?
Zasky 12-Mar-12 7:25am View
   
Deleted
Because the dialog result may not be the same. Something could be submitted within the child form, but the user may not want to ok the form. I don't know how the form is meant to behave, do you?
Zasky 4-Nov-11 5:06am View
   
Sorry, stupid mistake. Owner draw with measureitem will only allow you to change all items to the same height, as you have found. If you would consider using an icon for each item in the list you can set different sized icons for each item and the list will resize accordingly. You could use a dummy icon so it is not visible. Not perfect, but worth thinking about.
Finally, consider a custom control. Something like this may work for you:
http://www.codeproject.com/KB/list/MultilineListControl.aspx
Zasky 6-Oct-11 5:56am View
   
It might help if you post your TextChanged handler.
Zasky 6-Oct-11 5:42am View
   
Yes, the code above only handles the KeyPress on column 0.
Zasky 29-Sep-11 3:35am View
   
Are you using a standard DataGridView, or a derived class you didn't write?
Are you handling the CellFormatting event and changing the CellStyle?
Is CellStyle modified anywhere else in your code?
Zasky 26-Sep-11 6:02am View
   
Is the grid bound to a DataTable?