BC30451: Name 'BindDataGrid' is not declared.

T

TJS

trying to allow sorting in a datagrid
I don't understand error message - can u help ???



sql:
=====
SelectCommand = "SELECT * FROM tblA WHERE id = '" & vid & "'
order by " & strSortField


grid control:
===============

<asp:datagrid id="Grid" style="Z-INDEX: 101" runat="server"
AutoGenerateColumns="False" CellPadding="4" BackColor="White"
OnPageIndexChanged="DataGrid_Page" AllowPaging="True" ShowFooter="True"
HorizontalAlign="Center" BorderStyle="None" BorderWidth="1px"
BorderColor="Silver" DataKeyField="id" AllowSorting="True"
OnSortCommand="Grid_SortComand" />

sub:
==========

Sub Grid_SortComand(Sender As Object, E As DataGridSortCommandEventArgs)
BindDataGrid(e.SortExpression)
End Sub

error msg:
===============
Compiler Error Message: BC30451: Name 'BindDataGrid' is not declared.
 
A

Alvin Bruney

I guess i am asking the same question as the compiler. What is binddatagrid?
Is this defined somewhere? what does it do. To sort you only need to set the
sort expression to a dataview object and then bind that object to the
datagrid. Is that what your binddatagrid does?
It's complaining because it doesn't see a
public void BindDataGrid(string sort) method declared anywhere

hope this helps you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top