Click here to Skip to main content
15,884,176 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: AjaxControlToolkit behaviour Pin
vanikanc6-May-11 10:45
vanikanc6-May-11 10:45 
GeneralRe: AjaxControlToolkit behaviour Pin
Herman<T>.Instance17-May-11 4:43
Herman<T>.Instance17-May-11 4:43 
Questionvalidate textbox Pin
jashimu5-May-11 4:24
jashimu5-May-11 4:24 
AnswerRe: validate textbox Pin
Not Active5-May-11 4:51
mentorNot Active5-May-11 4:51 
AnswerRe: validate textbox Pin
Prasanta_Prince5-May-11 5:02
Prasanta_Prince5-May-11 5:02 
GeneralRe: validate textbox Pin
jashimu5-May-11 7:49
jashimu5-May-11 7:49 
GeneralRe: validate textbox Pin
AspDotNetDev5-May-11 8:25
protectorAspDotNetDev5-May-11 8:25 
QuestionGridView Paging Pin
fififlowertot4-May-11 23:06
fififlowertot4-May-11 23:06 
Hi,
I have a grid which is bound to data coming from a service at runtime.
The issue is every time i select next page number the page goes blank.

My code is as follows: for grid in aspx

<div>
        <asp:Label ID="Label1" runat="server" Text="Searching....." Font-Bold = "true"></asp:Label>
        <asp:GridView ID="grid1" runat="server" OnPageIndexChanging= "grid1_PageIndexChanged" 
            AutoGenerateColumns="False" Enabled ="false" AllowPaging="True" PageSize="5">
        <Columns>
       <asp:BoundField  DataField = "Name"/>
       <asp:BoundField  DataField = "ID"/>
      </Columns></asp:GridView>
        
            </div>


the codebehind(.cs) is typically is as follows:
on pageload:

grid1.Enabled = true;
                    DataTable dt = new DataTable();
                    dt.Columns.Add("Name");
                    dt.Columns.Add("ID");
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2); 
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2); 
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2); 
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                   grid1.DataSource = dt;
                   grid1.DataBind();  


protected void grid1_PageIndexChanged(Object sender, GridViewPageEventArgs e)
    {
                
        grid1.PageIndex = e.NewPageIndex;
        grid1.DataBind();
    }


what am i missing here
AnswerRe: GridView Paging Pin
Ravi Sant5-May-11 0:26
Ravi Sant5-May-11 0:26 
GeneralRe: GridView Paging Pin
fififlowertot5-May-11 0:31
fififlowertot5-May-11 0:31 
AnswerRe: GridView Paging Pin
Legor5-May-11 3:44
Legor5-May-11 3:44 
GeneralRe: GridView Paging Pin
fififlowertot5-May-11 4:29
fififlowertot5-May-11 4:29 
GeneralRe: GridView Paging Pin
vanikanc5-May-11 9:23
vanikanc5-May-11 9:23 
GeneralRe: GridView Paging Pin
fififlowertot5-May-11 10:24
fififlowertot5-May-11 10:24 
GeneralRe: GridView Paging Pin
vanikanc5-May-11 10:29
vanikanc5-May-11 10:29 
GeneralRe: GridView Paging Pin
fififlowertot5-May-11 22:02
fififlowertot5-May-11 22:02 
GeneralRe: GridView Paging Pin
Anky20117-May-11 3:37
Anky20117-May-11 3:37 
AnswerRe: GridView Paging Pin
Sneha Bisht5-May-11 23:32
Sneha Bisht5-May-11 23:32 
GeneralRe: GridView Paging Pin
fififlowertot6-May-11 0:43
fififlowertot6-May-11 0:43 
Questionhow can get the birthday from database to dropdownlist Pin
lolostar4-May-11 15:39
lolostar4-May-11 15:39 
AnswerRe: how can get the birthday from database to dropdownlist Pin
Not Active4-May-11 15:59
mentorNot Active4-May-11 15:59 
AnswerRe: how can get the birthday from database to dropdownlist Pin
Blue_Boy4-May-11 21:07
Blue_Boy4-May-11 21:07 
GeneralRe: how can get the birthday from database to dropdownlist Pin
lolostar4-May-11 23:41
lolostar4-May-11 23:41 
GeneralRe: how can get the birthday from database to dropdownlist Pin
Blue_Boy4-May-11 23:52
Blue_Boy4-May-11 23:52 
GeneralRe: how can get the birthday from database to dropdownlist Pin
Not Active5-May-11 2:08
mentorNot Active5-May-11 2:08 

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.