Getting the column from a table cell

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

  1. #1

    Default Getting the column from a table cell

    Hello everyone,

    Is it possible (and if so, how) to obtain a reference to the column
    given a table cell for a datagrid?

    Zahid

    zahidayar@gmail.com Guest

  2. Similar Questions and Discussions

    1. Adding more rows to one column/cell only?
      I have a basic table of three columns and 10 rows. I want to add two more rows to the last column only (it's an ordering form, and the last...
    2. datagrid cell and bound column
      Hi, i've registered a week ago at the managed newsgroups, but I didn't get a mail that the registration was ok. So I hope my question is answered. ...
    3. 2 horizontal column, but with odd number of result = empty cell!!
      I am a designer working with a programmer. I have designed a page for search results. This template is 2 columns large. But the user has the...
    4. Table cell width
      I've programatically built a table. Some cells in the table have tables inside them. The ones that have tables inside have the correct width,...
    5. Using a rollover to kick off a flash in a different table/table cell
      What I'd like to do but don't know if possible through Dreamweaver is the following: The web page has multiple tables. Use a rollover function...
  3. #2

    Default Re: Getting the column from a table cell

    What do you mean column, column of datagrid? And how do get the tablecell of
    the datagrid?


    <zahidayar@gmail.com> wrote in message
    news:1128340985.372640.121990@g14g2000cwa.googlegr oups.com...
    > Hello everyone,
    >
    > Is it possible (and if so, how) to obtain a reference to the column
    > given a table cell for a datagrid?
    >
    > Zahid
    >

    Elton Wang Guest

  4. #3

    Default Re: Getting the column from a table cell

    foreach (DataGridItem dgi in DataGrid1.Items)
    {
    // this code gives you the rows of the DataGrid
    foreach (Control c in dgi.Controls)
    TableCell tc = (TableCell)c;
    // the code above gets you the cells of the row
    ....
    }

    so we can get any row of the datagrid by using the code
    "DataGrid1.Items[i]"
    where 'i' is the row index...is there similarly a quick way to get a
    column? or once you have a cell, is it possible to get its parent row
    or column...?

    zahidayar@gmail.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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