DataGrid: some questions

Pete pete at mollysrevenge.com
Tue Sep 6 14:29:22 EDT 2011


You can tell if the user clicked in the header by checking "the dgHeader of
the target" - it will be empty if the user did not click on the header, the
long ID of the group containing all the column headers if the user clicked
on the header.  If the user clicked on a specific column header rather than
the empty area of the header to the right of the columns, the
dgHeaderControl of the target contains the long ID of the column header
control.

Never thought about detecting a click in the scrollbar, not sure how you
would rule that out.

Personally,I prefer to provide a button for the user to click on to add a
new row of data to a datagrid, just seems more user friendly to provide a
visual clue as to how to add a row than leave the user to guess that a
double click in an empty row of the datagrid is the way to do it.  With the
button approach, you avoid having to scroll through a bunch of rows to get
to the end of data and see an empty row, in fact there won't be an empty row
if the total number of rows of data is an exact multiple of the number of
visible rows in the datagrid.

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Tue, Sep 6, 2011 at 10:41 AM, Bob Sneidar <bobs at twft.com> wrote:

> It is possible to determine that a click or double-click in the datagrid
> was not in an active row with data. Just get the dgHilitedLine(s) inside a
> mouseUp or doubleMouseUp handler. If it's empty the user clicked or double
> clicked in an empty space in the dataGrid. Trouble is, it works equally well
> for clicks in the header and scrollbar too. :-)
>
> Bob
>
>
> On Sep 4, 2011, at 6:48 AM, Matthias Rebbe wrote:
>
> > Hi,
> >
> > what do i have to do to let my user to add a new row to a DataGrid table?
> I can edit an existing row(with already text in it), but i cannot add a new
> line to the grid by clicking into the next empty row.
> > Is that not possible?
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the use-livecode mailing list