Dot net grid view functionality in Android -
how can bind gridview
in android in dot net. see code below give delete button each row.is there similar functionality in android.
<asp:gridview id="gvsample" runat="server" width="100%" autogeneratecolumns="false" datakeynames="id,place,maddress" onrowcommand="gvsensors_rowcommand"> <columns> <asp:boundfield datafield="devicename" headertext="s id"> <itemstyle horizontalalign="center" /> </asp:boundfield> <asp:boundfield datafield="mcountry" headertext="country"> <itemstyle horizontalalign="center" /> </asp:boundfield> <asp:boundfield datafield="mstate" headertext="state"> <itemstyle horizontalalign="center" /> </asp:boundfield> <asp:templatefield headertext="select"> <itemtemplate> <asp:imagebutton id="btnselect" imageurl="~/img/select.png" runat="server" causesvalidation="false" commandargument='<%#((gridviewrow) container).rowindex %>' commandname="select" /> </itemtemplate> <itemstyle horizontalalign="center" /> </asp:templatefield> <asp:templatefield headertext="delete"> <itemtemplate> <asp:imagebutton id="lnkbtndelete" imageurl="~/img/delete.png" runat="server" causesvalidation="false" commandargument='<%#((gridviewrow) container).rowindex %>' commandname="deletec" /> </itemtemplate> <itemstyle horizontalalign="center" /> </asp:templatefield> </columns> </asp:gridview>
in android there no such automatic functionality provided ide
or sdk
.
first of need create custom xml layout
having fields select , delete button , have use layout
custom adapter
gridview
. may use recyclerview
gridlayoutmanager
same. lot of tutorials on how these things.
Comments
Post a Comment