Datagrid problem (extra rows) with a column behavior
Posted: Thu Aug 23, 2012 5:54 am
Hi I am a relative beginner to LiveCode and this is my first post so I'm sorry if its in the wrong place. I am stumped with a problem I have with a datagrid. I have a column behavior on one column to change the format. When my datagrid is being populated I have extra rows that shouldn't be there - the rows are blank except for data in the column that I have the behavior added to. The data is a repeat of that column from other rows but I can't figure out why it is being left there. This is the first (and maybe last!) time I've used column behaviors. Has anyone else had this sort of problem. Initially rather than use a column behavior I was attempting to change the format within the datagrid script (I already re-format a date column here but when I added this other column to format also it wouldn't work).
This is the only addition I've made to the behavior for this column to format from XXXXXX to XXXX-XX
on FillInData pData
put char 1 to 4 of pData & "-" & char 5 to 6 of pData into tnewtag
put tnewtag into pData
set the text of field 1 of me to pData
end if
end FillInData
When I sort on any column the data in the 'rogue' rows' column may change to whatever was left there from the previous sort - its like a cleanup needs to be done - where though?
Thanks - I hope this makes sense to someone out there.
This is the only addition I've made to the behavior for this column to format from XXXXXX to XXXX-XX
on FillInData pData
put char 1 to 4 of pData & "-" & char 5 to 6 of pData into tnewtag
put tnewtag into pData
set the text of field 1 of me to pData
end if
end FillInData
When I sort on any column the data in the 'rogue' rows' column may change to whatever was left there from the previous sort - its like a cleanup needs to be done - where though?
Thanks - I hope this makes sense to someone out there.