Click here to Skip to main content
15,923,273 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: need to know some back to basics stuff Pin
N a v a n e e t h18-Jan-08 2:12
N a v a n e e t h18-Jan-08 2:12 
GeneralRe: need to know some back to basics stuff Pin
Colin Angus Mackay18-Jan-08 5:30
Colin Angus Mackay18-Jan-08 5:30 
GeneralRe: need to know some back to basics stuff Pin
N a v a n e e t h18-Jan-08 2:10
N a v a n e e t h18-Jan-08 2:10 
Generaltracing the backpage Pin
sirisha guttikonda17-Jan-08 23:40
sirisha guttikonda17-Jan-08 23:40 
GeneralCatch and ignore the 'backspace' button Pin
anderslundsgard17-Jan-08 23:22
anderslundsgard17-Jan-08 23:22 
GeneralProblem in sorting datagrid in ASP.NET 1.1 Pin
NetBot17-Jan-08 23:16
NetBot17-Jan-08 23:16 
GeneralRe: Problem in sorting datagrid in ASP.NET 1.1 Pin
Venkatesh Mookkan17-Jan-08 23:57
Venkatesh Mookkan17-Jan-08 23:57 
GeneralRe: Problem in sorting datagrid in ASP.NET 1.1 Pin
NetBot18-Jan-08 23:15
NetBot18-Jan-08 23:15 
<blockquote class="FQ"><div class="FQA"> Venkatesh Mookkan wrote:</div>Check whether you have assigned value in the SortExpression of each BoundColumns.

SortExpression might be the column name which is use to sort the GridView.
</blockquote>


I haven`t explicitly specified the sortexpression in the .aspx page.

for your reference i m giving you the code

Sub FillGrid()
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = "List_Party_Info"
cmd.CommandType = CommandType.StoredProcedure
sda = New SqlDataAdapter
sda.SelectCommand = cmd
ds = New DataSet
sda.Fill(ds)
CustGrid.DataSource = ds
CustGrid.DataBind()
Session("Data") = ds
ValidateGrid()
End Sub

above code is used for binding the grid

and the following is the sort command

Private Sub CustGrid_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles CustGrid.SortCommand
Dim ds1 As DataSet = CType(Session("Data"), DataSet)
Dim dv As DataView = ds1.Tables(0).DefaultView
dv.Sort = e.SortExpression
FillGrid()

End Sub

Html Code


<asp:datagrid id="CustGrid" CssClass="datagrid" Runat="server" cellpadding="4" bordercolor="#EFEFEF"
AutoGenerateColumns="False" AllowSorting="True">
<AlternatingItemStyle CssClass="datagrid_row"></AlternatingItemStyle>
<ItemStyle CssClass="datagrid_row1"></ItemStyle>
<HeaderStyle CssClass="datagrid_heading"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="PARTY_CODE" HeaderText="Code"></asp:BoundColumn>
<asp:BoundColumn DataField="_XXXX" HeaderText="Bill Unit"></asp:BoundColumn>
<asp:BoundColumn DataField="YYYY" HeaderText="Name"></asp:BoundColumn>
<asp:BoundColumn DataField="ZZZZZZ" HeaderText="Role"></asp:BoundColumn>
</Columns>
<PagerStyle Mode="NumericPages"></PagerStyle>
</asp:datagrid>
but this event doesn`t fire..Whate can be the problem???
AnswerRe: Problem in sorting datagrid in ASP.NET 1.1 Pin
Venkatesh Mookkan19-Jan-08 5:18
Venkatesh Mookkan19-Jan-08 5:18 
Questionneed to do sorting for a gridview where data is binded promatically [modified] Pin
neodeaths17-Jan-08 22:22
neodeaths17-Jan-08 22:22 
GeneralRe: need to do sorting for a gridview where data is binded promatically Pin
Venkatesh Mookkan18-Jan-08 0:00
Venkatesh Mookkan18-Jan-08 0:00 
Generalneed quick anwer Pin
G.K.M.17-Jan-08 22:16
G.K.M.17-Jan-08 22:16 
GeneralRe: need quick anwer Pin
Paddy Boyd17-Jan-08 22:19
Paddy Boyd17-Jan-08 22:19 
GeneralRe: need quick anwer Pin
G.K.M.17-Jan-08 22:22
G.K.M.17-Jan-08 22:22 
GeneralRe: need quick anwer Pin
Paddy Boyd18-Jan-08 1:23
Paddy Boyd18-Jan-08 1:23 
Generalwhere has to use Server side and client side code Pin
idsanjeevjha17-Jan-08 21:37
idsanjeevjha17-Jan-08 21:37 
QuestionHow to refresh my sql server database to reflect changes in .XSD file on another machine? Pin
Nada Adel17-Jan-08 21:23
Nada Adel17-Jan-08 21:23 
Questioncrystal report numeric data problem Pin
Pankaj Garg17-Jan-08 20:19
Pankaj Garg17-Jan-08 20:19 
Generalalert notification Pin
bhattiprolu17-Jan-08 20:13
bhattiprolu17-Jan-08 20:13 
AnswerRe: alert notification Pin
Pankaj Garg17-Jan-08 20:28
Pankaj Garg17-Jan-08 20:28 
GeneralRe: alert notification Pin
Rajesh_K_Sharma17-Jan-08 20:48
Rajesh_K_Sharma17-Jan-08 20:48 
QuestionHow to restart the catalog in windows indexing service ? Pin
hyderalishah17-Jan-08 20:03
hyderalishah17-Jan-08 20:03 
QuestionHow can this be possible? Pin
v1i9n6o7d17-Jan-08 19:42
v1i9n6o7d17-Jan-08 19:42 
GeneralRe: How can this be possible? Pin
N a v a n e e t h17-Jan-08 20:06
N a v a n e e t h17-Jan-08 20:06 
GeneralRe: How can this be possible? Pin
Venkatesh Mookkan17-Jan-08 21:10
Venkatesh Mookkan17-Jan-08 21:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.