Re: Identifying Rows



On Dec 29, 6:40 pm, "Mark Rae [MVP]" <m...@xxxxxxxxxxxxxxxxx> wrote:
"Milosz Skalecki [MCAD]" <mily...@xxxxxxxxxxxxxxxxx> wrote in messagenews:EDE6104A-03AC-45F4-A7A2-FB3FC6205413@xxxxxxxxxxxxxxxx

Refering to Mark's reply, bound field is represendted by DataTableCell
(which does not contain any child controls) therefore in order to get the
value you must use Text property
row.Cells[index].Text

You are right of course, but I took the OP's statement of "so I put a
<LABEL> in one of the cells" to mean that he'd created a TemplateColumn
containing an <asp:Label> control - I have a feeling now that he didn't...

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net

I'm pretty fresh to .NET (as u can probably tell :), and always liked
the control ASP gave me (I don't like using wizards to bind data etc
since i feel I lose flexibility and control)... I know .NET is pretty
flexible, I just have to learn all the tricks. The way I'm loading my
data is through a function I wrote that loads a DataTable into memory
(global var on the page), then binds a DataView to the GridView (based
on the users filters), my hopes are to avoid going to the server to
reload the DataTable with each filter change. So what I was doing is
when loading my DataTable, I updated the text of one of the columns
with a "<LABEL>" -- I see now it's not the right approach.

Thanks a lot for the responses and insight... looks like the
DataKeyNames can satisfy my needs for sure, and I will try messing
with actually adding controls to the cell.
.



Relevant Pages

  • Re: Drawing question
    ... Well you're not going to load all of the controls constantly - it's going to ... Actually I am loading data from an XML-File. ... It is double-buffered, so I am first creating a bitmap, then I am drawing ... to it and after that I am loading the bitmap in the picturebox. ...
    (microsoft.public.dotnet.framework.compactframework)
  • How do I updating Save state
    ... Private _loading As Boolean = False ... >to connect my business objects to my form controls. ... >for example update the enabled/disabled state of the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: placing runat="server" in body tag causes discrepancies with loadi
    ... Why are there two attempts at loading the post data in the first ... Why would a page function normally and load viewstate for a control, ... Loading viewstate is a tricky beast for controls that are dynamically ...
    (microsoft.public.dotnet.framework)
  • Re: Delayed displaying of a form?
    ... be loading the data on a worker thread. ... > painting until the last child control has done painting is too long. ... > some of the controls, and then transparent rectangular 'holes' where you ... > contexts" in MFC and then swapping the result into the visual context, ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Issues in ASP.NET 2.0 when dynamically loading user controls or asp.net web controls???
    ... The majority of issues related to dynamic loading of controls deal with ... users loading controls at the wrong time in the cycle. ... searched for articles on the internet and in the end I must say that I'm ...
    (microsoft.public.dotnet.framework.aspnet)