A solution to finding controls in datagrid footer...

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default A solution to finding controls in datagrid footer...

    Hi all,

    I saw a lots of developers posting question on finding controls in
    datagrid footer...
    I have experimenting differents solution and find one that needn't
    ItemDataBound ou ItemCommand :

    Table tbl = (Table)dgWorkgroup.Controls[0];

    foreach(TableRow row in tbl.Rows)
    {
    RequiredFieldValidator val =
    (RequiredFieldValidator)row.FindControl("requireVa lidatorFooterName");
    if(val != null)
    {
    val.Visible = true;
    }
    }

    Casting dgWorkgroup.Controls[0] to Table allow you to scan in the Rows
    collection of the table (header and footer included) so on a
    particular row you can find your control(s)....


    Hope helping you !

    Nofear.
    Nofear Guest

  2. Similar Questions and Discussions

    1. How Access Controls In A DataGrid Footer
      OK - I am prepared for everyone who will tell me this is a hack and bad idea; however, this is the only way I could find to solve this problem, and...
    2. Method to Access Controls In A DataGrid Footer
      Hi, I noticed some ppls are struggling on access Controls In A DataGrid Footer this is the way i done and works pretty well . Take a look...
    3. Problem finding datagrid in Page.controls collection
      You can find datagrid in page by refering the form. Gatagrid is a child control of Form. Here is the code ----------------- Dim ctl As New...
    4. Finding a solution for make routing registry
      Hello I'm ver new in Perl. I want to get the best solution, help me please. I'm doing a project which use Perl. My work is to create a daemon...
    5. Plz help finding replication solution!
      Is it possible to replicate data from table1 INTO a pre-existing table2? I read up a bit on replication and it looks like a replicated table has to...
  3. #2

    Default Re: A solution to finding controls in datagrid footer...

    Thanks a bunch. It works great; clever too. Indeed, I had the same
    problem--disabling the validation controls in the footer.

    Isaac Citrom.



    On 11 Aug 2003 07:59:50 -0700, [email][email protected][/email] (Nofear) wrote:
    >Hi all,
    >
    >I saw a lots of developers posting question on finding controls in
    >datagrid footer...
    >I have experimenting differents solution and find one that needn't
    >ItemDataBound ou ItemCommand :
    >
    > Table tbl = (Table)dgWorkgroup.Controls[0];
    >
    > foreach(TableRow row in tbl.Rows)
    > {
    > RequiredFieldValidator val =
    >(RequiredFieldValidator)row.FindControl("requireV alidatorFooterName");
    > if(val != null)
    > {
    > val.Visible = true;
    > }
    > }
    >
    >Casting dgWorkgroup.Controls[0] to Table allow you to scan in the Rows
    >collection of the table (header and footer included) so on a
    >particular row you can find your control(s)....
    >
    >
    >Hope helping you !
    >
    >Nofear.
    [email protected] Guest

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139