|
List Info
Thread: C-Sharp (C#) Group: Panel with vertical scroll bar
|
|
| C-Sharp (C#) Group: Panel with vertical
scroll bar |

|
2006-07-31 13:04:05 |
I'm a convert from VB6 to C#. In VB we used to have a
great control
called a DataRepeater, which allows a record set to be bound
to a list.
An equivalent does not seem to be available in .NET. I
eventually
found a great way of replicating it: create a custom control
(which
represents a row from the record set, so it has a height of,
say, 20
and a big width) and place as many of them as necessary into
the
Controls collection of a Panel, each one below the previous.
If the
Panel has auto-scroll enabled, that's all you need to do.
You can
scroll up and down 1000 rows.
Suppose I add 500 rows to the Panel, but only 20 are visible
on screen,
I can easily scroll up and down the list. The Panel seems
to have been
well designed, since it only renders the controls that are
visible on
screen. I get good performance as I scroll up and down the
list, even
if there are 800 rows added to the panel.
But here's a problem I came across: If I open a message box
when the
Panel is scrolled, say, half way down, when I close the
message box the
Panel's scroll bar pops right to the top, showing the first
row, which
I don't want. I thought of a way around this: before
opening the
message box, note the position of the vertical scroll bar.
When the
message box is closed, set the scroll bar value. This does
work, in
that the Panel displays the same controls as it did before.
However,
the scroll bar still goes back to the top.
I might need to provide more info, but any help would be
most
appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|
|
| C-Sharp (C#) Group: Re: Panel with
vertical scroll bar |

|
2006-07-31 19:49:54 |
Davy,
Why would you not simply bind your DataSet/Table/etc...
to a
ListBox, or ListView control, as these could be bound
directly to your
data without any need for extraneous code? Did the
DataRepeater do
something that I am forgetting?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|
|
| C-Sharp (C#) Group: Re: Panel with
vertical scroll bar |

|
2006-08-01 12:20:25 |
Lance,
I'm not aware of a way to include, say, check boxes in a
list view or
listbox, such that when they are ticked they update the
corresponding
bit column in the database? I am still climbing a steep
learning curve
in .NET, and am aware my knowledge is limited.
I am not new to Windows development, though. My concern
with binding
controls to data is the reliance they then have to the data
tier. I
want to separate the user services from the data tier.
Perhaps that
can still be achieved by implementing a data set on the
client (my
application is Winforms, not thin client) and binding a list
view to
that? But I still don't know how to put check boxes on the
rows?
If you could point me in the right direction I would be most
grateful.
Cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|
|
| C-Sharp (C#) Group: Re: Panel with
vertical scroll bar |

|
2006-08-01 13:28:12 |
|
http://www.codeproject.com/vb/net/CustmizdListView.asp
Might even be able to use the posted code outright without modifications.
Liam
On 8/1/06, Davy B <itv.com">david.bridge itv.com> wrote:
Lance,
I'm not aware of a way to include, say, check boxes in a list view or listbox, such that when they are ticked they update the corresponding bit column in the database? I am still climbing a steep learning curve
in .NET, and am aware my knowledge is limited.
I am not new to Windows development, though. My concern with binding controls to data is the reliance they then have to the data tier. I want to separate the user services from the data tier. Perhaps that
can still be achieved by implementing a data set on the client (my application is Winforms, not thin client) and binding a list view to that? But I still don't know how to put check boxes on the rows?
If you could point me in the right direction I would be most grateful.
Cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group. To post to this group, send email to C_Sharp googlegroups.com To unsubscribe from this group, send email to C_Sharp-unsubscribe googlegroups.com For more options, visit this group at http://groups.google.com/group/C_Sharp -~----------~----~----~----~------~----~------~--~---
|
| C-Sharp (C#) Group: Re: Panel with
vertical scroll bar |

|
2006-08-02 08:39:10 |
That looks very interesting Liam. Thanks for the lead.
I have found a new control in .NET 2005, the DataGridView.
It does
exactly what I want. You can bind to a data source, include
combos,
checkboxes, text boxes, it can sort, the user can rearrange
the
columns, change their widths, you can change the height of
individual
rows, it's extremely good.
Cheers,
Davy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|
|
[1-5]
|
|