Click here to Skip to main content
13,087,566 members (93,360 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all I have written a code to display the textbox text which is outside aspxgridview by performing some operation under HtmlRowPrepared event of aspxgridview. This is my sample code

double lPrice=0;
 protected void ASPxGrd_HtmlRowPrepared(object sender, ASPxGridViewTableRowEventArgs e)
     if (e.VisibleIndex >= 0)
        for (int i = 0; i < ASPxGrd.VisibleRowCount; i++)
            ASPxTextBox txtPrice= ASPxGrd.FindRowCellTemplateControl(i,
               ASPxGrd.Columns["Price"] as GridViewDataColumn, "txtPrice") as ASPxTextBox;
            lPrice+= double.Parse(txtTotLinePrice.Text);
          txtOutTax.Text=lPrice.ToString(); // Text box which is out side the gridview

I tried in many ways but still unable to assign the text box text but when I debug it and see I am able to see the text assigning to the text box, but when coming to form I couldn't. I also set EnableCallBack=False for the ASPXGridview even though issue remains same. Can some one help me
Posted 6-May-13 19:39pm
Prasad Khandekar 7-May-13 3:27am

The HtmlRowPrepared event is raised for each grid row (data row, group row, etc.) within the ASPxGridView. You can handle this event to change the style settings of individual rows. So this may not be the good idea. But if you want to do it this way then ensure that the e.RowType is equal to GridViewRowType.Data and also e.Row.Cells.Count > 1.

demouser743 7-May-13 4:24am
Is there any other event where I can handle this scenario

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 7 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100