foreach (GridViewRow with a radGrid?

4 posts, 0 answers
  1. Markus
    Markus avatar
    9 posts
    Member since:
    Nov 2008

    Posted 25 Nov 2008 Link to this post

    With a standard Gridview I can do like this:

      
            foreach (GridViewRow row in GridView1.Rows)
                {

                Label lblAmount = (Label)row.FindControl("lblAmount") as Label;


    How do I resolve it with a RadGrid? I'm lost and new with this..
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 25 Nov 2008 Link to this post

    Hi Markus,

    Here is an example:

    foreach (GridDataItem item in RadGrid1.Items)
    {
       
    }

    Regards,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Markus
    Markus avatar
    9 posts
    Member since:
    Nov 2008

    Posted 25 Nov 2008 Link to this post

    thanks but how do I get the reference to:

    Telerik.WebControls;

    Because now I got this error:

    The type or namespace name 'GridDataItem' could not be found (are you missing a using directive or an assembly reference?)  


    I only got  Telerik.Web;

    How can I make a reference to the webcontrol, and where can I find the dll for that.





  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Nov 2008 Link to this post

    Hello Markus,

    For the prometheus version of grid(RadGrid for Asp.Net Ajax) the reference should be specified as 'Telerik.Web.UI' whereas Telerik.WebControls is the reference for RadGrid for Asp.Net version.

    Thanks
    Princy.
Back to Top