Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / March 2004

Tip: Looking for answers? Try searching our database.

Using Dataset without Binding to Textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Atif - Alghanem - 30 Mar 2004 14:16 GMT
hi,
I need to use a dataset without binding to a text box. i need to move value
from dataset to textbox manually. does anyone have any sample for this.

Thanks and regards
atif
Trygve Lorentzen - 31 Mar 2004 15:38 GMT
rowCurrentOrder is a DataRow set to a row of a DataTable of a DataSet like
this:

rowCurrentOrder = dsChapter13.Orders[0];

Sample code below:

if (rowCurrentOrder != null)

{

txtOrderID.Text = rowCurrentOrder.OrderID.ToString();

if (rowCurrentOrder.IsCustomerIDNull())

txtCustomerID.Text = strNull;

else

txtCustomerID.Text = rowCurrentOrder.CustomerID;

if (rowCurrentOrder.IsEmployeeIDNull())

cboEmployee.SelectedIndex = -1;

else

cboEmployee.SelectedValue = rowCurrentOrder.EmployeeID;

if (rowCurrentOrder.IsOrderDateNull())

txtOrderDate.Text = strNull;

else

txtOrderDate.Text = rowCurrentOrder.OrderDate.ToShortDateString();

lblOrdersPosition.Text = "Order " + (intOrderPosition + 1) + " of " +
vueOrders.Count;

vueDetails.RowFilter = "OrderID = " + rowCurrentOrder.OrderID;

}

else

{

txtOrderID.Clear();

txtCustomerID.Clear();

txtOrderDate.Clear();

lblOrdersPosition.Text = "No Orders";

vueDetails.RowFilter = "False";

}

> hi,
> I need to use a dataset without binding to a text box. i need to move value
> from dataset to textbox manually. does anyone have any sample for this.
>
> Thanks and regards
> atif

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.