---
title: "Få fram placering"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/79825-få-fram-placering"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "andreas_lindh"
published: "2003-06-16T09:48:33.000Z"
updated: "2003-06-16T10:20:33.000Z"
replies: 2
views: 224
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/dotnet/79825-få-fram-placering"
---

# Få fram placering

## #1 — andreas_lindh, 2003-06-16T09:48Z

Jag har en datagrid där jag skriver ut en hockeytabell.

Nu vill jag skriva ut vilken placering laget har. 
Går det att lägga till en column i datagriden som skriver ut placeringen?

Permalänk: https://www.webforum.nu/p/79825

## #2 — Dino, 2003-06-16T10:08Z

> **.NET Framework SDK documentation skrev:**
>
> To ensure that the values in a column are unique, you can set the column values to increment automatically when new rows are added to the table. To create an auto-incrementing DataColumn, set the AutoIncrement property of the column to true. The DataColumn will then start with the value defined in the AutoIncrementSeed property, and with each row added the value of the AutoIncrement column will increase by the value held in the AutoIncrementStep property of the column.
> 
> For AutoIncrement columns, it is recommended that the ReadOnly property of the DataColumn be set to true.
> 
> The following example demonstrates how to create a column that starts with a value of 200 and adds incrementally in steps of three.
> 
> Dim workColumn As DataColumn = workTable.Columns.Add("CustomerID", typeof(Int32))
> workColumn.AutoIncrement = true
> workColumn.AutoIncrementSeed = 200
> workColumn.AutoIncrementStep = 3

Permalänk: https://www.webforum.nu/p/1084009

## #3 — andreas_lindh, 2003-06-16T10:20Z

jag testade med det här

```
Dim workColumn As DataColumn = workTable.Columns.Add("placering", typeof(Int32)) 
workColumn.AutoIncrement = true 
workColumn.AutoIncrementSeed = 1 
workColumn.AutoIncrementStep = 1
```

Den klagar på den sista ).
d:\\inetpub\\wwwroot\\tibroik.net\\atabell.ascx.vb(43): 'Is' expected.

Permalänk: https://www.webforum.nu/p/1084012

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/79825-få-fram-placering
