Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 19, 2007 04:59 AM by krupalali
Aug 24, 2005 07:48 PM|LINK
Aug 24, 2005 09:45 PM|LINK
Aug 25, 2005 05:20 PM|LINK
I take it that I just need to work around this until the bug is fixed, or is set as a design change and will stay this way.
The above code works to set fields to read-only, however I have a tough time getting the previous values from the DetailsView so I can repopulate the parameters. I'd rather not have to create another entire sqldatasource just for a single field difference,
so I'm trying to accomplish this without luck:
sdsSerialDetail.UpdateParameters(CType(c, System.Web.UI.WebControls.BoundField).DataField).DefaultValue = "XYZ"
CType(c, System.Web.UI.WebControls.BoundField).ReadOnly = True
I'd like to somehow grab the value from the detailsview and populate the datsource update parameters with it so it passes it back to the db. The XYZ string should actually be grabbed somehow via the detailsview, but I don't see an easy way to reference values
in a detailsview without knowing its rowIndex, which in itself is almost impossible to get programmatically. I would never want to set detailsview1.rows(#).cells(1).text because who knows when the row number (#) is going to change ... I can't count on it
being the same number all the time. Why is there not a rows() using a name instead of just an index? I think I'm missing something ...
I tried using FindControl but when it's a boundfield I don't believe I can do this ... the control name is unknown because its auto generated.
Sep 06, 2005 10:14 AM|LINK
Sep 08, 2005 04:47 PM|LINK
Sep 16, 2005 11:17 PM|LINK
Sep 29, 2005 12:46 PM|LINK
While thats an so-so workaround if you are already manually generating your fields manually, its not a solution at all if you are autogenerating your fields. The ability to make changes to the autogenerated fields, such as setting them readonly or visible,
and not having the issue of data gone missing are to very important fixes that *MUST* be made.
Sep 29, 2005 10:57 PM|LINK
Sep 30, 2005 02:20 AM|LINK
Or how you can't get manipulate at run-time the autogenerated fields either, that needs to be fixed too.
Oct 22, 2005 09:18 PM|LINK