Events in ASP.Net

Group,

Is there any event that finalize the loading of a page

I would like to get the property values of a gridview... such as cell width, but don't know where to start.

I tried the Page_Load event, but not able to attain the width values of each cell in a row

sample: gvTemp.Rows[0].Cells[0].Width

this returns 0's

Please help.



Answer this question

Events in ASP.Net

  • Blast

    You would have to do this in the DataBinding event of the Grid - however I will warn you, that what you are trying to do - probablly can't be done. Width should always be Null/Empty unless you specifically set a column width.

    Hope this helps. Let us know if you have any further questions or comments.


  • R.Tutus

    i figured as much... though i am able to do this with vb.net code behind ASP.Net.

    The main objective of this... is to create a separate header section...

    I had a tmp asp.net table and the code behind, i've created something like the following:

     

    //c#

    tmpTable.Rows.Add(gvMain.HeaderRow); //but the cells width does not align directly under each column of the gvMain

    //vb

    tmpTable.Rows.Add(gvMain.HeaderRow)

    tmpTable.Width=gvMain.Width

     

    If anyone have a better idea on making the cells align, besides vbscript, jscript, javascript, css (which all 4, i know how to do) or any other client side scripting... please help.

     

    Thanks in advance.

     


  • Events in ASP.Net