datagrid question

G

Guest

Hi there,
I need some advice on the best way to go about this:

I have a datagrid populating from a SQL server database.
There is a field in the SQL table (STR_COMMENTS) that I don't want to
display in the datagrid (it's too big) but I would like some kind of flag
(check box checked or something) if comments do exists in SQL.
Then if comments do exist, I want the user to double click that row, and the
comments display in a pop-up form.

I can't figure out how to go about this.
Any suggestions?

Cheers,
Amber
 
W

W.G. Ryan MVP

Create a new datacolumn of type Boolean. Then, set its expression property
to indicate true when there is text present in the otehr column and false
when it's not - LEN(ColumnName) > 0.

If you're using winforms then the checkbox should come in automatically...
but you can use a DataGridTableStyle/ColumnStyle if you need more control.

HTH,

Bill
 
G

Guest

I created the datagrid using the toolbox and properties.
I can see how to add another column, but not how to set it's datatype or set
expressions...can you be more specific?
Thanks!
Amber
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top