gridview - Setting a footer without GridViewCommandEventArgs in asp.net -


I have a gridview. The footer is labeled. I need to set the label within a function..I do not have any E (GridViewCommandEventArgs) due to no such occurrence of it now. This is my code

  `GridViewRow footer = (GridViewRow) CartGrid.FooterRow; Label total = (label) footer Fund Control ("Total Elblatt"). Text = sum.ToString (); `  

I'm getting the error - & gt; 'Object is not set to an instance of reference object.'

CartGrid is the gridview. The label for LBL total is the label Yoga .

You can use or for event example,

  Zero to CartGrid_RowCreated (Object Sender, GridViewRowEventArgs E) {if (r.Row.RowType == DataControlRowType.Footer) {...}}    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -