Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4695
DateTime Value in ultragrid
posted

Dear all,

I have below issue. Do you know how to solve it?


public void RefreshList()
{
dt = new DS_LoyaltyClearPoints.DTLoyaltyClearPointsDataTable();
DS_Loyalty.DTLoyaltyRow dr = dt.NewDTLoyaltyRow();

.......................
dr.ExpiryDate = temp.MembershipProfile.enddate;    // dr.ExpiryDate is DateTime Value.
..........................

this.ultraGrid1.DataSource = dt;

}


DateTime last_expiry_date = Convert.ToDateTime(this.ultraGrid1.Rows[i].Cells["ExpiryDate"].Value); 
// Prompt error in object not set to reference...

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    Where does the code that causes the error get called from? What event is this code in?

    If you are getting a NullReferenceException, then something in that line of code is null. So check those objects and see which one is coming back null. It is the row? Te cell? The Value?

Children
No Data