Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataGrid - sorting/paging problem

Reply
Thread Tools

DataGrid - sorting/paging problem

 
 
Hajime Kusakabe
Guest
Posts: n/a
 
      07-30-2003
Hi.

I have created a datagrid (datagrid1) without any columns on a aspx page.
Then aspx.vb adds columns from a database.

It is somthing like this ....
==================================
Dim myBoundColumnEntryBy As New BoundColumn()
myBoundColumnEntryBy.DataField = "Entry By"
myBoundColumnEntryBy.SortExpression = "Entry By"
myBoundColumnEntryBy.HeaderText = "Entry By"
DataGrid1.Columns.Add(myBoundColumnEntryBy)

DataGrid1.DataSource = dv ' dv is a dataview.
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataBind()
==================================

Everything working except Sorting/Paging features.
When I click the sorting or paging the whole datagrid disappear.

Any idea?

Thanks.
Haji


 
Reply With Quote
 
 
 
 
Hajime Kusakabe
Guest
Posts: n/a
 
      07-30-2003
Sorry ... I forgot to mention this ...

When I click for sorting it does not get the subroutine
"DataGrid1_SortCommand" at all.

If I create the column in design mode (not runtime) then when I click for
sorting it calls the subroutine and do sorting.

Haji

"Hajime Kusakabe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi.
>
> I have created a datagrid (datagrid1) without any columns on a aspx page.
> Then aspx.vb adds columns from a database.
>
> It is somthing like this ....
> ==================================
> Dim myBoundColumnEntryBy As New BoundColumn()
> myBoundColumnEntryBy.DataField = "Entry By"
> myBoundColumnEntryBy.SortExpression = "Entry By"
> myBoundColumnEntryBy.HeaderText = "Entry By"
> DataGrid1.Columns.Add(myBoundColumnEntryBy)
>
> DataGrid1.DataSource = dv ' dv is a dataview.
> DataGrid1.CurrentPageIndex = 0
> DataGrid1.DataBind()
> ==================================
>
> Everything working except Sorting/Paging features.
> When I click the sorting or paging the whole datagrid disappear.
>
> Any idea?
>
> Thanks.
> Haji
>
>



 
Reply With Quote
 
 
 
 
Saravana
Guest
Posts: n/a
 
      07-31-2003
Can you send your codebehind file code, actually where you are creating
columns for datagrid.

--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.


"Hajime Kusakabe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi.
>
> I have created a datagrid (datagrid1) without any columns on a aspx page.
> Then aspx.vb adds columns from a database.
>
> It is somthing like this ....
> ==================================
> Dim myBoundColumnEntryBy As New BoundColumn()
> myBoundColumnEntryBy.DataField = "Entry By"
> myBoundColumnEntryBy.SortExpression = "Entry By"
> myBoundColumnEntryBy.HeaderText = "Entry By"
> DataGrid1.Columns.Add(myBoundColumnEntryBy)
>
> DataGrid1.DataSource = dv ' dv is a dataview.
> DataGrid1.CurrentPageIndex = 0
> DataGrid1.DataBind()
> ==================================
>
> Everything working except Sorting/Paging features.
> When I click the sorting or paging the whole datagrid disappear.
>
> Any idea?
>
> Thanks.
> Haji
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in nesting datagrid in to a nested datagrid sajvargs ASP .Net 0 02-20-2005 12:17 AM
problema ultima pagina datagrid asp.net/problem last page datagrid roberto ASP .Net Datagrid Control 1 02-17-2005 07:50 AM
DataGrid edited values problem and autogenerated columns in DataGrid problem John Walsch ASP .Net Web Controls 0 07-09-2004 03:03 PM
Call Datagrid Command column outside datagrid Dave ASP .Net 0 11-20-2003 11:11 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments