SPGridView current item in Sharepoint
Posted
by pistacchio
on Stack Overflow
See other posts from Stack Overflow
or by pistacchio
Published on 2010-02-25T15:23:56Z
Indexed on
2010/03/24
15:23 UTC
Read the original article
Hit count: 492
sharepoint
Hi,
I'm making a custom webpart. I takes some items from a list and display them with a SPGridView.
I bound the fields like this:
// Grab data from a SP List into dvwTickets
SPGridView grdMyTickets = new SPGridView();
grdMyTickets.DataSource = dvwTickets;
[..]
BoundField colTicketTypology = new BoundField();
colTicketTypology.DataField = "ID";
colTicketTypology.HeaderText = ticketList.Fields.GetFieldByInternalName("ID").Title;
grdMyTickets.Columns.Add(colTicketTypology);
[..]
This works. Now, what a grid does behind the scene when binding data to it is cycling through the binded data. How can I access the "Current Item" to make operations on each item while binding?
Thanks
© Stack Overflow or respective owner