Click here to Skip to main content
11,717,570 members (79,752 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: DevExpress
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 at 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 at 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
0 Sergey Alexandrovich Kryukov 764
1 OriginalGriff 215
2 F-ES Sitecore 210
3 Maciej Los 140
4 Jochen Arndt 120
0 Sergey Alexandrovich Kryukov 1,494
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415

Advertise | Privacy | Mobile
Web01 | 2.8.150901.1 | Last Updated 7 May 2013
Copyright © CodeProject, 1999-2015
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