You must Sign In to post a response.
  • Category: Silverlight

    Datagrid row and column value

    Hi ,

    I have a datagrid with 3 rows and 3 cols.I am populating some values by applying some condition in 1st row last cell and 2nd row last cell as a result 3rd row last cell is empty.

    Now, I need to write some logic in 3rd row last colum:

    say 1 st row last cell value is A.
    2nd row last cell value is B.

    Now I have to write C -(A+B) in 3rd row last cell value of datagrid.

    Please help .

  • #753564

    If you want to perform some calculation based on some condition on your datasource control then refer below sample this might be helpful to you.

    int a=0,b=0;
    protected void GV_OnRowDataBound(object sender, GridViewRowEventArgs e)
    int index=e.Row.RowIndex;
    else if(index==1)
    else if(index==2)

    Try something like above to achieve your goal..

    Hope this will helpful to you to achieve your goal..

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • Sign In to post your comments