DataGrid Allow Editing of Columns Only?

Andre Garzia andre at andregarzia.com
Wed Aug 17 17:52:00 EDT 2011


oh this one is going on my evernote...

On Wed, Aug 17, 2011 at 6:36 PM, zryip theSlug <zryip.theslug at gmail.com>wrote:

> On Wed, Aug 17, 2011 at 11:17 PM, Scott Rossi <scott at tactilemedia.com>
> wrote:
> > Another DG question...
>
> So another answer. 8)
>
> > Any way to disable sorting of a column or all columns?  Ideally I would
> like
> > to prevent the sort arrow from showing up at all in the column header,
> but I
> > can live with it if necessary.
>
> It exists indeed a way for doing that.
>
> Place this handler in the datagrid group's script:
>
> on SortDataGridColumn pColumn
> end SortDataGridColumn
>
> Remaining it empty will disable the sorting capability of the datagrid.
>
> For disable sorting of a specific column, just don't pass the
> SortDataGridColumn message for it.
> Example for a column "Name":
>
> on SortDataGridColumn pColumn
>  if pColumn is "Name"
>    --- doNothing
>  else
>    pass SortDataGridColumn
>  end if
> end SortDataGridColumn
>
>
> Best regards,
> --
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
>
> _______________________________________________
> 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
>



-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list