Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
DC Gringo #1
datagrid won't sort
I have a datagrid that won't sort. The event handler is firing and return
label text, just not the sort.
Here's my Sub Page_Load and Sub DataGrid1_SortCommand:
--------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
SqlDataAdapter1.Fill(DsAdvanced1)
If Not IsPostBack Then
DataGrid1.DataBind()
Provinces.DataBind()
Districts.DataBind()
SubDistricts.DataBind()
Communities.DataBind()
End If
End Sub
--------------------
Public Sub DataGrid1_SortCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridSortCommandEvent Args) Handles
DataGrid1.SortCommand
lblWhatClicked.Text = "You clicked: " & e.SortExpression
Dim dv As New DataView(DsAdvanced1.Tables(0))
dv.Sort = e.SortExpression
DataGrid1.DataSource = dv
DataGrid1.DataBind()
End Sub
--
_____
DC G
DC Gringo Guest
-
sort in datagrid
Hi, I have some columns in my datagrid which are date type. I want to sort on them. What would be the best way to do it. Based on a article to... -
Sort datagrid
Hello Group, I have a datagrid which needs to be sorted but the column headers should not be clickable on certain conditions( say on the "print... -
Datagrid sort
I have a datagrid that sorts. The sort doesn't seem to execute on my template column. It only works on my bound columns. -
bidirectional sort with datagrid
Can someone show me how to turn this into a bi-directional sort allowing ascending and descending using the default datagrid allowsorting attribute?... -
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB.
Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. hi, guys i have asp... -
Alvin Bruney [MVP] #2
Re: datagrid won't sort
Your post went unanswered. Have you resolved this issue?
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
[url]http://tinyurl.com/3he3b[/url]
"DC Gringo" <dcgringo@visiontechnology.net> wrote in message
news:OaAMDdu$DHA.2012@TK2MSFTNGP11.phx.gbl...> I have a datagrid that won't sort. The event handler is firing and return
> label text, just not the sort.
>
> Here's my Sub Page_Load and Sub DataGrid1_SortCommand:
>
> --------------------
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> SqlDataAdapter1.Fill(DsAdvanced1)
>
> If Not IsPostBack Then
> DataGrid1.DataBind()
> Provinces.DataBind()
> Districts.DataBind()
> SubDistricts.DataBind()
> Communities.DataBind()
> End If
>
> End Sub
>
> --------------------
>
>
> Public Sub DataGrid1_SortCommand(ByVal source As Object, ByVal e As
> System.Web.UI.WebControls.DataGridSortCommandEvent Args) Handles
> DataGrid1.SortCommand
>
> lblWhatClicked.Text = "You clicked: " & e.SortExpression
>
> Dim dv As New DataView(DsAdvanced1.Tables(0))
> dv.Sort = e.SortExpression
> DataGrid1.DataSource = dv
> DataGrid1.DataBind()
>
> End Sub
>
> --
> _____
> DC G
>
>
Alvin Bruney [MVP] Guest
-
DC Gringo #3
Re: datagrid won't sort
Sort of...thankfully I'm only in beta and I got it to work without using
code-behind...I must have issues relating to the sharing of variables
between the separate pages...
-____-
DG
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:ORt2zcGAEHA.2484@TK2MSFTNGP12.phx.gbl...return> Your post went unanswered. Have you resolved this issue?
>
> --
> Regards,
> Alvin Bruney [ASP.NET MVP]
> Got tidbits? Get it here...
> [url]http://tinyurl.com/3he3b[/url]
> "DC Gringo" <dcgringo@visiontechnology.net> wrote in message
> news:OaAMDdu$DHA.2012@TK2MSFTNGP11.phx.gbl...> > I have a datagrid that won't sort. The event handler is firing and>> > label text, just not the sort.
> >
> > Here's my Sub Page_Load and Sub DataGrid1_SortCommand:
> >
> > --------------------
> >
> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
> > 'Put user code to initialize the page here
> > SqlDataAdapter1.Fill(DsAdvanced1)
> >
> > If Not IsPostBack Then
> > DataGrid1.DataBind()
> > Provinces.DataBind()
> > Districts.DataBind()
> > SubDistricts.DataBind()
> > Communities.DataBind()
> > End If
> >
> > End Sub
> >
> > --------------------
> >
> >
> > Public Sub DataGrid1_SortCommand(ByVal source As Object, ByVal e As
> > System.Web.UI.WebControls.DataGridSortCommandEvent Args) Handles
> > DataGrid1.SortCommand
> >
> > lblWhatClicked.Text = "You clicked: " & e.SortExpression
> >
> > Dim dv As New DataView(DsAdvanced1.Tables(0))
> > dv.Sort = e.SortExpression
> > DataGrid1.DataSource = dv
> > DataGrid1.DataBind()
> >
> > End Sub
> >
> > --
> > _____
> > DC G
> >
> >
>
DC Gringo Guest



Reply With Quote

