DPLyonnais Posted January 27, 2004 Posted January 27, 2004 Hello, does anyone know if it is possible to in sert multiple fields in a single column in a datagrid? Can you do it using the property builder? If so, how? Thanks, Dan Quote
Muhad Posted January 28, 2004 Posted January 28, 2004 First let me say I am just a novice with .net. Below is code as to how I put fields together in one column. I am not sure this is the best way but it does work. In --> DataGrid1_ItemDataBound... For i = 0 To DataGrid1.Items.Count - 1 If myDataSet.Tables(0).Rows.Count > 0 And DataGrid1.Items.Count > 0 Then ''DataGrid1.Items(i).Cells(0).Text = "<img border='0' src='Images\arrow_right.gif' height='16' width='16'>" DataGrid1.Items(i).Cells(1).Text = "<img border='0' src='" & myDataSet.Tables(0).Rows(i).Item("Smiley") & "' height='16' width='16'>" ' Works strdatajoin = "<a href='Details2.aspx?Name=" strTildeQuote = myDataSet.Tables(0).Rows(i).Item("Name") strTildeQuote = strTildeQuote.Replace("'", "~") strdatajoin = strdatajoin & strTildeQuote strdatajoin = strdatajoin & "&Category=" strdatajoin = strdatajoin & myDataSet.Tables(0).Rows(i).Item("Category") strdatajoin = strdatajoin & "'><font color='#008B8B' weight='bolder''>" strdatajoin = strdatajoin & " >> " & myDataSet.Tables(0).Rows(i).Item("Name") strdatajoin = strdatajoin & "</font></a>" strdatajoin = strdatajoin & strbreakline strdatajoin = strdatajoin & "<font color='#363636'>" strdatajoin = strdatajoin & myDataSet.Tables(0).Rows(i).Item("Text") & "</font>" DataGrid1.Items(i).Cells(4).Text = strdatajoin End If Next i Quote
DPLyonnais Posted February 2, 2004 Author Posted February 2, 2004 I have built a datagrid using the property builder in C#, does anyone know of a different way to insert multiple fileds in a column for a record? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.