Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 158809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:44:51+00:00 2026-05-11T10:44:51+00:00

I am developing a Windows mobile application. How can I show only two columns

  • 0

I am developing a Windows mobile application. How can I show only two columns of the twelve in my datatable in the grid?.

Also, is it possible to delete rows in the Windows Mobile datagrid?

Please provide sample code.


Hi StartClass0830,

Thanks for your reply, i don’t want remove the columns in my grid, Let’s say In the windows mobile application the dtNewOrder table contains 11 columns i need to display the certain fields from dtNewOrder to the datagrid.

And another question is the datagrid contains 10 rows how i am deleting the certain rows in the grid.

Please give me sample code; I have been struggling with this problem for a couple of days.

Here is what I have:

Imports System.Data Imports System.Text Imports System.IO Imports System.Data.SqlServerCe   Dim dtCustomerName As DataTable  Dim dtNewOrder As DataTable  Dim _objDataAccess As New DataAccess  Private Sub NewOrder_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load          dtNewOrder = CreateNewOrderDataTable()  End Sub   Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)  Handles btnAdd.Click      AddNewOrderMember(dtNewOrder) End Sub   Private Sub AddNewOrderMember(ByVal dtNewOrder As DataTable)         Try             Dim NewOrderMemberRow As DataRow = dtNewOrder.NewRow()             NewOrderMemberRow('OrderID') = System.Guid.NewGuid()             NewOrderMemberRow('SalesPersonID') = '123'             NewOrderMemberRow('CustomerGroupID') = ddlCutomerGroup.SelectedValue.ToString()             NewOrderMemberRow('CustomerID') = ddlCustomerName.SelectedValue.ToString()             NewOrderMemberRow('CustomerItemCode') = '123'             NewOrderMemberRow('Category') = 'Dummy Category'             'NewOrderMemberRow('Description') = 'Dummy Des'             NewOrderMemberRow('OrderUnit') = 'Each'             NewOrderMemberRow('OrderQuantity') = txtOrderQuantity.Text             NewOrderMemberRow('UnitPrice') = '123'             NewOrderMemberRow('TotalAmount') = '30000'             dtNewOrder.Rows.Add(NewOrderMemberRow)             dtNewOrder.AcceptChanges()              If dtNewOrder.Rows.Count > 0 Then                 dgNewOrder.DataSource = dtNewOrder             End If          Catch ex As Exception             MessageBox.Show(ex.Message, 'Mobile Retail Merchandising', MessageBoxButtons.OK, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)         End Try     End Sub   Private Function CreateNewOrderDataTable() As DataTable          dtNewOrder = New DataTable('NewOrder')         Try             dtNewOrder.Columns.Add(New DataColumn('OrderID', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('SalesPersonID', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('CustomerGroupID', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('CustomerID', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('CustomerItemCode', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('Category', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('Description', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('OrderUnit', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('OrderQuantity', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('UnitPrice', Type.GetType('System.String')))             dtNewOrder.Columns.Add(New DataColumn('TotalAmount', Type.GetType('System.String')))              Dim PrimaryKeyColumns() As DataColumn = New DataColumn(1) {}             PrimaryKeyColumns(0) = dtNewOrder.Columns('OrderID')             dtNewOrder.PrimaryKey = PrimaryKeyColumns             Return dtNewOrder         Catch ex As Exception             MessageBox.Show(ex.Message, 'Mobile Retail Merchandising', MessageBoxButtons.OK, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)             Return dtNewOrder         End Try     End Function 

Thanks brite

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:44:51+00:00Added an answer on May 11, 2026 at 10:44 am

    Your question is somewhat problematic. You mentioned 2 columns in your grid and 12 columns in your datatable and you want to delete ROWS!

    I take it you mean COLUMNS instead of ROWS. When you do data-binding to your grid, you can specify which columns in the 12 you want. There is no need to delete columns.

    In the event, you REALLY mean ROWS, you can modify your SQL or LINQ queries to have those unwanted ROWS removed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 80k
  • Answers 80k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer After reading your question i have been looking for a… May 11, 2026 at 4:16 pm
  • Editorial Team
    Editorial Team added an answer Since the C++0x is not yet finalized, you can only… May 11, 2026 at 4:16 pm
  • Editorial Team
    Editorial Team added an answer I recommend using the Telerik Code Converter as a start.… May 11, 2026 at 4:16 pm

Related Questions

I am developing an application using Windows Mobile 5.0, under embedded VC++ 4.0, and
I am creating a mobile web application using asp.net. The application must support iPhone,
I will be developing some applications using mobile barcode scanners and need to choose
I am developing a forms app (not web) for Windows Mobile, using .NET CF

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.