3
Reply

Difference between BoundField and TemplateField?

Sheetal Arora

Sheetal Arora

15y
30.2k
1
Reply

    Bound field

    By  using bound field we can bind the data directly by using header text and datafield with out using any controls.

    Headertext : we can specify header for the data

    Datafield : Its the field which gets the data from dataset.

    Example : if we specify a field name in datafield it searches in dataset with the same column name and binds the data.

    we can define our own asp controls in bound field column only thing we can do is only binding the data.

    Template field

    We can define our own asp controls in template field.

    and we can bind the data from dataset to template field columns directly.

     

     

    Bound Field :- It is use to Display your Data in GridView . Templete Field :- If U Want To do Some More Action in GridView Like Editing , Display Images etc Then U Hav To Use Templete Filed.

    BoundField is used to display databound data meanwhile TemplateFiled represents a field that displays custom content in a data-bound control