PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → table control in add checkbox control
table control in add checkbox control
Iniciado por guest, 15,may. 2015 14:55 - 3 respuestas
Publicado el 15,mayo 2015 - 14:55
i am try select checkbox in table control to set value is true but not proper work my code

i,j is int

HReadFirst(QRY_GetChapterWaysQurstion)
FOR i=1 _TO_ StringCount(QRY_GetChapterWaysQurstion.SQ_QM_ID,",")
//info(ExtractString(sVst,i,", "))
j=ExtractString(QRY_GetChapterWaysQurstion.SQ_QM_ID,i,",")
TableSelectPlus(TABLE_QuestionMaster,TABLE_QuestionMaster.COL_QuestionMasterID,j)
TABLE_QuestionMaster.COL_chekbox..Value=True
END
Publicado el 15,mayo 2015 - 15:17
Hi Vijay,

let n = TableSeek(TABLE_QuestionMaster,COL_QuestionMasterID,j)
IF n > 0 THEN
COL_Checkbox[n] = True
END

Best regards,
Alexandre Leclerc
Publicado el 18,mayo 2015 - 12:16
but sir

that is not proper work,
i try it,

IF HNbRec(QRY_GetChapterWaysQurstion)>0 THEN
n,i,j is int
HReadFirst(QRY_GetChapterWaysQurstion)
FOR i=1 _TO_ StringCount(QRY_GetChapterWaysQurstion.SQ_QM_ID,",")
j=ExtractString(QRY_GetChapterWaysQurstion.SQ_QM_ID,i,",")
TableSelectPlus(TABLE_QuestionMaster,TABLE_QuestionMaster.COL_QuestionMasterID,j)

n = TableSeek(TABLE_QuestionMaster,TABLE_QuestionMaster.COL_QuestionMasterID,j)
IF n > 0 THEN
TABLE_QuestionMaster.COL_chekbox[n]..Value=True

END
END
END
Publicado el 19,mayo 2015 - 16:57
Do you want to save the value as well?

Why donnot keep code simple,. In the when everchanged section of a colum of the table.

if Hreadseekfirst( file, file.id, table . colum ID ) then

file.item = 1
hmodify ( file )
end

After that maybe a table refres and your checkox wil be checked.

regards
Alard