drf-dx-datagrid
drf-dx-datagrid copied to clipboard
Django Many to Many Fields
Hi Unable to display the m2m field in the grid filter it is showing the django id instead
in seralizer im using like below code
current_responsible = serializers.SlugRelatedField(many=True,read_only=True,slug_field='username')
in db models.py
current_responsible = models.ManyToManyField(User,verbose_name= "Current Responsible")
in html
{ dataField: "current_responsible",selector:"current_responsible__username", caption: "Responsible", dataType: "string", alignment: "left",allowFiltering:false,allowHeaderFiltering:true},