Click here to Skip to main content
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 20: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 OriginalGriff 410
1 Sergey Alexandrovich Kryukov 350
2 ProgramFOX 275
3 Maciej Los 275
4 CHill60 260
0 OriginalGriff 360
1 ProgramFOX 265
2 Maciej Los 235
3 CHill60 200
4 RyanDev 170

Advertise | Privacy | Mobile
Web03 | 2.8.150331.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