K
kamlesh
Hi All,
I have a question on the ASP.NET 2.0 Details view control
I dont like using the SQLDataSource to bind the data to the
DetailsView control..
I dont like the idea of placing Queries in the .ASPX files...I
prefer a 3 tiered approach to
development.
Am using a Custom object to bind the object to the Details View
control at run time..
When the page loads....like this
BO.TestBO bo = new BO.TestBO();
CustomObject object = bo.GetProfileInformation(1);
this.personalInfoDetailsView.AllowPaging = false;
this.interestInfoDetailsView.AllowPaging = false;
this.personalInfoDetailsView.DataSource = object;
this.personalInfoDetailsView.DataBind();
This is the Details view control...
<aspetailsView CellPadding="1" Font-Names="Verdana" Width="100%">
<Fields>
<asp:BoundField DataField="name" ReadOnly="True"
SortExpression="name" />
<asp:CheckBoxField DataField="gender"
SortExpression="gender" />
<asp:BoundField DataField="interests"
ReadOnly="True"
SortExpression="interests" />
<asp:CommandField ShowEditButton="True" />
</Fields>
</aspetailsView>
So here the custom object has three properties
name ---> contains a name
gender ---> boolean value
interests --> This contains a comma separated string (Example:
music,movies, cycling, tennis)
So during Display mode.... the 'interests' field shows the comma
separated values.
But during edit mode, a text box appears in its place and the comma
separated values are populated for editing purpose...
Now when user goes into edit mode ....i want each value of the comma
separated string as a separate check box...so that the user can select
the options..
Is this possible?
What special code is to be written?
I have a question on the ASP.NET 2.0 Details view control
I dont like using the SQLDataSource to bind the data to the
DetailsView control..
I dont like the idea of placing Queries in the .ASPX files...I
prefer a 3 tiered approach to
development.
Am using a Custom object to bind the object to the Details View
control at run time..
When the page loads....like this
BO.TestBO bo = new BO.TestBO();
CustomObject object = bo.GetProfileInformation(1);
this.personalInfoDetailsView.AllowPaging = false;
this.interestInfoDetailsView.AllowPaging = false;
this.personalInfoDetailsView.DataSource = object;
this.personalInfoDetailsView.DataBind();
This is the Details view control...
<aspetailsView CellPadding="1" Font-Names="Verdana" Width="100%">
<Fields>
<asp:BoundField DataField="name" ReadOnly="True"
SortExpression="name" />
<asp:CheckBoxField DataField="gender"
SortExpression="gender" />
<asp:BoundField DataField="interests"
ReadOnly="True"
SortExpression="interests" />
<asp:CommandField ShowEditButton="True" />
</Fields>
</aspetailsView>
So here the custom object has three properties
name ---> contains a name
gender ---> boolean value
interests --> This contains a comma separated string (Example:
music,movies, cycling, tennis)
So during Display mode.... the 'interests' field shows the comma
separated values.
But during edit mode, a text box appears in its place and the comma
separated values are populated for editing purpose...
Now when user goes into edit mode ....i want each value of the comma
separated string as a separate check box...so that the user can select
the options..
Is this possible?
What special code is to be written?