[DUG] Delphi .Net question
jamessugrue at xtra.co.nz
jamessugrue at xtra.co.nz
Thu Jan 4 09:14:17 NZDT 2007
Check to see the option to automatically populate fields is turned off in the property window of the Grid? Don't use D.NET but in CS(MS) it will ignore your code if this is set.
---- Jeremy Coulter <vss at vss.co.nz> wrote:
> Hi all.
> I have a couple of days to look at some .net stuff.
> I am going to convert a current ASP site (4 pages) to .Net.
>
> I have a DBGrid I want to populate froma stored procedure, and currently it
> works, BUT the fields displayed on the screen are NOT the ones defined in
> the .aspx file,
>
> <ASP:DataGrid id="DataGrid1" runat="server">
> <Columns>
> <ASP:BoundColumn datafield="patient"
> headertext="Patient"></ASP:BoundColumn>
> <ASP:BoundColumn datafield="APPLICATION_DATE"
> headertext="Date"></ASP:BoundColumn>
> <ASP:BoundColumn datafield="Doctor"
> headertext="Doctor"></ASP:BoundColumn>
> <ASP:BoundColumn datafield="SURGERY"
> headertext="Surgery"></ASP:BoundColumn>
> <ASP:BoundColumn datafield="CANCER"
> headertext="Cancer"></ASP:BoundColumn>
> </Columns></ASP:DataGrid></p>
>
>
> what I get is ALL the fields returned.
>
> This is my code. can anyoen see WHY I get the result I get ?
>
> SqlConnection1 := SQLConnection.create(sConstr);
> sqlDA := SQLDataAdapter.Create('EXEC PEP_SSB_Registration_Summary_lsp
> 1',SqlConnection1);
> ds := Dataset.create;
>
> sqlDA.Fill(ds);
> DataGrid1.DataSource:=Ds;
> DataGrid1.Columns.Clear;
> DataGrid1.DataKeyField:='SSB_APPLICATION_ID';
> DataBind;
>
> Thanks, Jeremy
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.16.3/614 - Release Date: 02/01/2007
> 14:58
>
More information about the Delphi
mailing list