Display child table value based on selection of parent in other doctype

Hi Team,

I created 2 custom doctype one is parent called category and another is child subcategory.In HD Ticket i want to store this these records so i created 1 custom field category and it is link to category doctype.So here i am able to select category.I created another custom field sub category here i want to display child table value based on selection of category. Example i have category A inside that X,Y,Z are childs.So when they select A category in subcategory i need to display x,y,z.

Please help me .

Thanks