asp.net - For Each GridviewRow Loop, with where clause? -
is there easier way of using code:
for each gvrow gridviewrow in gvgridviewexample.rows if gvrow.rowtype = datacontrolrowtype.datarow 'do end if next such when using ienumerable theoritically (psuedo code style) add a:
gvgridviewexample.where(function(chr) chr.row = datarow) i wondered if there easier way of coding out?
thanks,
firstcape
apart fact first snippet is simple , clear, rows property of gridview returns only datarows. don't need check type @ all.
the
rowsproperty (collection) used store data rows in gridview control.only rows rowtype property set
datacontrolrowtype.datarowstored in rows collection. gridviewrow objects represent header, footer, , pager rows not included in collection.
you can have different types in events rowcreated or rowdatabound. if want access header, footer or pager outside of these events can use appropriate properties of gridview headerrow or footerrow.
Comments
Post a Comment