Page 1 of 1

Changing the defauly behaviour of FillInData

Posted: Fri Nov 27, 2009 12:59 am
by phaworth
I'm using various custom properties in conjunction with some formatting code to handle the translation of various data types between the screen and my sqlite database. For example, a custom property named isDate with a value of true defines that a field is a date and I Have code that formats the date correctly when retrieveing it form the database for display on a card and also when storing it back in the database from a card.

I would like to use these same routines in FillInData but I don't want to go in and create a custom behaviour for every column in every datagrid where its required. I guess I'm looking for a way to change the default code in FillInData to call my formatting routines so that every column in every datagrid will have the formatting code in there.

Is that possible?

Thanks,
Pete

Re: Changing the defauly behaviour of FillInData

Posted: Tue Dec 01, 2009 3:31 pm
by trevordevore
Yes, you can override the default behavior for rendering data to a cell.

How Do I Override the Default Behavior For Rendering Data to a Cell?

Re: Changing the defauly behaviour of FillInData

Posted: Tue Dec 01, 2009 10:26 pm
by phaworth
Thanks Trevor. I had read that lesson but it doesnt feel like I can quite do what I would like ideally. The example you gave seems like I would have to do that for every datagrid with a column I want to customise. What I was hoping was that I could somehow set the script of the "Default Column" button for every datagrid I create to include the code I need without having to change the dgProps to point to a different button. It's a subtle difference, hope I'm explaining it correctly.
Thanks,
Pete

Re: Changing the defauly behaviour of FillInData

Posted: Tue Dec 01, 2009 10:38 pm
by trevordevore
You would need to edit the template button of the revDataGridLibrary stack and then save the stack. You will need to do this each time you download an update to the Rev IDE and you will need to rebuild any standalones you may have already created.

Re: Changing the defauly behaviour of FillInData

Posted: Wed Dec 02, 2009 12:17 am
by phaworth
Thanks Trevor. That sounds like asking for trouble to me so I think I'll go with the method outlined in the lesson.
Pete