How do you select/highlight the first row of a table that uses custom cells?
I try me.selectrow(0,0) in the table open event but it gives an outofbounds error, so I tried using a timer thinking it hadn’t created the custom cells on opening in time but get the same error. If I use a timer on a normal table without custom cells it highlights the first row??
DataTable.AddSection("My Styles")
try
db.DatabaseFile = dbfile
if db.connect then
IsConnected = True
var rs as rowset = db.SelectSQL("select * from Team")
myrowcount = rs.RowCount
for each r as DatabaseRow in rs
Var cell As MobileTableCellData = DataTable.CreateCustomCell(GetTypeInfo(TeamCustomCell))
Var container As TeamCustomCell = TeamCustomCell(cell.Control)
container.TeamLogo.Image = RushDataTable
container.DBidLabel.Text = rs.Column("ID").StringValue.ToText
container.TeamNameLabel.Text = rs.Column("Name").StringValue.ToText
container.AddressLabel.Text = rs.Column("Address").StringValue.ToText
container.PhoneLabel.Text = rs.Column("Mobile").StringValue.ToText
DataTable.AddRow(0,cell)
next
end if
catch e as DatabaseException
system.DebugLog e.Message
end try