Datagrid binded to sqlceresultset (how to)

D

Destiny..

I have the following questions:

1., Can I mapping datas in a datagrid binded to a sqlceresultset? Fe.:
In the database there is "1" in a field, but i would like to display
"yes" instead of in the datagrid.

2., Can I color somehow datagrid rows based on the datas ( by sql
where if possible )? Fe.: I want to color to red all the rows which
meets the following sql criteria WHERE col1 = '1' AND col2 LIKE
'%query%' ? I would like to do this dynamically and i dont want to
write an sql interpreter if not neccessary.

3., Can I add a plus row to all datagrid pages dynamically to sum the
above rows values?

Thanks for help.
 
A

Alberto Silva - Microsoft MVP - Device Application

Hi,
Regarding your first question, you can display 'Yes' instead of 1 using a
CASE WHEN expression at your SELECT instruction. About your other 2
questions, I would recommend you to take a look at ComponentOne FlexGrid for
..NET CF (has the ability to automatically add a row for totals) or Resco
Smartgrid.

--

Alberto Silva
www.moving2u.pt - R&D Manager
http://msmvps.com/AlbertoSilva - Blog
Microsoft MVP - Device Application Development
 
D

Destiny..

Thanks for quick reply!

The first answer is ok, but I would like to solve the second two
things myself, not by buying an other software... So I need some more
help in that.
 
D

Destiny..

Hi Arun!

Unfortunatly this example uses dataset as datasource, not
sqlceresultset and it colors all odd rows, so coloring doesnt based on
datas. I have some projects where I already used datagrid row
coloring, so the problem really is, how can I easily color datagrid
rows based on the datas comes from sqlceresultset. ( by a given sql
WHERE clause )
You wrote: "All these can be achieved by writting custom column for
the datagrid
columns"
Can you explain how to use custom columns to make sum rows in a
datagrid? ( again: by using sqlceresultset )

Thanks: Gábor
 

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