datagrid raw

Discussion in 'ASP .Net Datagrid Control' started by Simon Abolnar, Apr 23, 2005.

  1. I would like to read data from datagrid.
    How can I read one cell from datagrid (raw, column).

    How can I find out total numbers of raws.

    Thanks for help,

    Simon
     
    Simon Abolnar, Apr 23, 2005
    #1
    1. Advertising

  2. Simon Abolnar wrote:
    > I would like to read data from datagrid.
    > How can I read one cell from datagrid (raw, column).
    >
    > How can I find out total numbers of raws.


    By "raw" I assume you mean "row"...

    You can determine the total number of rows using the following property:

    DataGridID.Items.Count

    You can access a particular cell of the DataGrid using the following code:

    'VB.NET
    Dim cell as TableCell = DataGridID.Items(rowIndex).Cells(colIndex)

    // C#
    TableCell cell = DataGridID.Items[rowIndex].Cells[colIndex];

    Once you have the TableCell instance you can read the text contents via
    the .Text property. (If it's a TemplateColumn you will need to work
    through the control hierarchy... see the following two FAQs for how to
    programmatically work with the contents of BoundColumns and TemplateColumns:

    http://datawebcontrols.com/faqs/ProgrammaticAccess/AccessingBoundColumnContents.shtml
    http://datawebcontrols.com/faqs/ProgrammaticAccess/AccessingTemplateColumnContents.shtml

    hth
     
    Scott Mitchell [MVP], Apr 23, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Satinderpal Singh

    access web server using raw HTTP...

    Satinderpal Singh, Jun 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    525
    Feroze [msft]
    Jul 14, 2004
  2. Beanut

    Read raw binary file

    Beanut, Sep 2, 2005, in forum: VHDL
    Replies:
    0
    Views:
    914
    Beanut
    Sep 2, 2005
  3. Satinderpal Singh

    access web server using raw HTTP...

    Satinderpal Singh, Jun 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    345
    John Timney \(Microsoft MVP\)
    Jun 2, 2004
  4. Ohad Young

    datagrid - delete raw problem

    Ohad Young, Aug 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    400
    Martin Marinov
    Aug 10, 2004
  5. Andreas Klemt
    Replies:
    0
    Views:
    339
    Andreas Klemt
    Oct 8, 2003
Loading...

Share This Page