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.GetProfileIn formation(1);
this.personalIn foDetailsView.A llowPaging = false;
this.interestIn foDetailsView.A llowPaging = false;
this.personalIn foDetailsView.D ataSource = object;
this.personalIn foDetailsView.D ataBind();
This is the Details view control...
<asp:DetailsVie w CellPadding="1" Font-Names="Verdana" Width="100%">
<Fields>
<asp:BoundFie ld DataField="name " ReadOnly="True"
SortExpression= "name" />
<asp:CheckBoxFi eld DataField="gend er"
SortExpression= "gender" />
<asp:BoundFie ld DataField="inte rests"
ReadOnly="True"
SortExpression= "interests" />
<asp:CommandFie ld ShowEditButton= "True" />
</Fields>
</asp:DetailsView >
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? 2 1482
On Jun 8, 12:23 am, kamlesh <kamles...@gmai l.comwrote:
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.GetProfileIn formation(1);
this.personalIn foDetailsView.A llowPaging = false;
this.interestIn foDetailsView.A llowPaging = false;
this.personalIn foDetailsView.D ataSource = object;
this.personalIn foDetailsView.D ataBind();
This is the Details view control...
<asp:DetailsVie w CellPadding="1" Font-Names="Verdana" Width="100%">
<Fields>
<asp:BoundFie ld DataField="name " ReadOnly="True"
SortExpression= "name" />
<asp:CheckBoxFi eld DataField="gend er"
SortExpression= "gender" />
<asp:BoundFie ld DataField="inte rests"
ReadOnly="True"
SortExpression= "interests" />
<asp:CommandFie ld ShowEditButton= "True" />
</Fields>
</asp:DetailsView >
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?
Hi...
SqlDataSource and ObjectDataSouec e of Asp.net 2.0 are two fine new
feature ...
and we did liked it very much... But it seems your requirement is a
little bit different...
Asp.net site have few very good article demonastrating working with
data... and matches your need http://www.asp.net/learn/dataaccess/....aspx?tabid=63 http://www.asp.net/learn/dataaccess/....aspx?tabid=63 http://www.asp.net/learn/dataaccess/....aspx?tabid=63
Thanks
Masudur
hey all,
I got a solution for this...
please refer this post.. http://forums.asp.net/t/1120050.aspx
On Jun 10, 2:59 am, Masudur <munn...@gmail. comwrote:
On Jun 8, 12:23 am, kamlesh <kamles...@gmai l.comwrote:
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.GetProfileIn formation(1);
this.personalIn foDetailsView.A llowPaging = false;
this.interestIn foDetailsView.A llowPaging = false;
this.personalIn foDetailsView.D ataSource = object;
this.personalIn foDetailsView.D ataBind();
This is the Details view control...
<asp:DetailsVie w CellPadding="1" Font-Names="Verdana" Width="100%">
<Fields>
<asp:BoundFie ld DataField="name " ReadOnly="True"
SortExpression= "name" />
<asp:CheckBoxFi eld DataField="gend er"
SortExpression= "gender" />
<asp:BoundFie ld DataField="inte rests"
ReadOnly="True"
SortExpression= "interests" />
<asp:CommandFie ld ShowEditButton= "True" />
</Fields>
</asp:DetailsView >
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?
Hi...
SqlDataSource and ObjectDataSouec e of Asp.net 2.0 are two fine new
feature ...
and we did liked it very much... But it seems your requirement is a
little bit different...
Asp.net site have few very good article demonastrating working with
data... and matches your need
http://www.asp.net/learn/dataaccess/....aspx?tabid=63
Thanks
Masudur- Hide quoted text -
- Show quoted text -
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Derck |
last post by:
SORRY, for the crosspost, but I think I posted it in the wrong group!
Hello all,
I have a question.. I am tying to make a global listview class where other
listviews in my application points to, so when I change something in that
listview all listviews who points to that listview must be updated.. But I
don't have a idea why it isn't working..
I tried to make a singeton listview class and get a instance on the form
|
by: > Adrian |
last post by:
I am getting these errors:
DrawListViewItemEventArgs' could not be found
DrawListViewSubItemEventArgs' could not be found
DrawListViewColumnHeaderEventArgs' could not be found
I am already referencing both:
System.Drawing
System.Drawing.Design
|
by: randy.buchholz |
last post by:
Been fighting this one for a while, looking for help.
I have a simple page with a grid view and details view (just managing a
single table). The details view is primarily used for creating new records,
and the grid for display. Everything works fine unless there are no records
in the table. In this case the details view does not show, so there is no
way (for a user) to enter the first record unless I set the default mode to
Insert. I...
|
by: baldrick |
last post by:
I have a listview that I set to view.details with the following
code...
With Me.ListView
.View = View.Details
But when I add the declaration
Imports ADOX
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |