D
David Hearn
I have a SQLDataAdapter that I have configured. Since I want to tie this to
a DataGrid and add sorting to the datagrid, I do not want to configure the
adapter with sorting. I want to be able to add the sorting at runtime
depending on the column that the user clicked on the datagrid. I am probably
missing something very simple here. Below is the code that I am using to
fill my datagrid.
Thanks in advance!
sqlMfgNumber.SelectCommand.Parameters(0).Value = "%" &
txtSearchFor.Text.Trim & "%"
sqlMfgNumber.SelectCommand.Parameters(1).Value = strOmittedNumber
sqlMfgNumber.Fill(DsMfgNumberSearch1)
If DsMfgNumberSearch1.Tables(0).Rows.Count > 0 Then
lblError.Visible = False
Datagrid1.DataSource = DsMfgNumberSearch1
Datagrid1.DataBind()
Else
lblError.Visible = True
End If
a DataGrid and add sorting to the datagrid, I do not want to configure the
adapter with sorting. I want to be able to add the sorting at runtime
depending on the column that the user clicked on the datagrid. I am probably
missing something very simple here. Below is the code that I am using to
fill my datagrid.
Thanks in advance!
sqlMfgNumber.SelectCommand.Parameters(0).Value = "%" &
txtSearchFor.Text.Trim & "%"
sqlMfgNumber.SelectCommand.Parameters(1).Value = strOmittedNumber
sqlMfgNumber.Fill(DsMfgNumberSearch1)
If DsMfgNumberSearch1.Tables(0).Rows.Count > 0 Then
lblError.Visible = False
Datagrid1.DataSource = DsMfgNumberSearch1
Datagrid1.DataBind()
Else
lblError.Visible = True
End If