עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[ASP.NET] איך לשנות עיצוב של DataGrid?

Featured Replies

פורסם

אני רוצה לשנות את הצורה של הטבלה ככה שהעמודות יהיו לרוחב, כלומר הheader column לא יהיה למעלה אלה בצד

דוגמא:

----------------

כותרת| פרטים | ...

-----------------

כותרת| פרטים | ...

-----------------

פורסם
  • מחבר

הצלחתי למצוא איך עושים את זה דרך asp.net ;D

הקוד:

Sub BindData()
Dim dsTBind As New DataSet
dsTBind = FlipDataSet(objdataset)
Dim dv As New DataView
dv = dsTBind.Tables(0).DefaultView
dg.datasource = dv
dg.databind()
End Sub

Function FlipDataSet(ByVal ods As DataSet) As DataSet
Dim ds As New DataSet
Dim dt As New DataTable
Dim fdt As New DataTable
Dim i As Integer = 0
Dim k As Integer = 0
Dim j As Integer = 0
Dim r As DataRow
For Each dt In ods.tables

For i = 0 To dt.Rows.Count
fdt.Columns.Add(Convert.ToString(i))
Next i

For k = 1 To dt.Columns.Count - 1
r = fdt.NewRow()
r(0) = dt.Columns(k).ToString()

For j = 1 To dt.Rows.Count
r(j) = dt.Rows(j - 1)(k)
Next j

fdt.Rows.Add(r)

Next k



ds.Tables.Add(fdt)
Next dt

FlipDataSet = ds
Return FlipDataSet
End Function

עריכה:

האמת שגם עם זה יש בעיה.. זה עובר רק כ AUTO GENERATE COLUMN שאני לא רוצה.

יש למישהו רעיון?

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.