[RESOLVED] [02/03] Datagrid and huge field that needs to be bound...
hey,
I got a pretty big field in my database that the user wants bound in a datagrid along with all kinds of other normal sized fields. It's in vs2003 which I don't use often but I am working with somebody's legacy code. Anyways I would like to use a template field with something to contain the data so it doesn't stretch out my rows too badly. The question is what control should I bind the data to? I pretty much want it to be like a multiline read only textbox but I noticed in the page source that I couldn't use the text property to bind the data to.
anyone got a suggestion?
Thanks!
Re: [RESOLVED] [02/03] Datagrid and huge field that needs to be bound...
nvm got it, did it in the itemdatabound event.
vb Code:
Private Sub dgJobs_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgJobs.ItemDataBound
Try
Dim txtBox As TextBox = e.Item.FindControl("TextBox2")
txtBox.Text = dgJobs.DataKeys.Item(e.Item.ItemIndex)
Catch ex As Exception
End Try
End Sub