Click here to Skip to main content
15,893,266 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
Hi ,

Your Page_Load checks if it is not a postback right ?
This means your code sets the DataSource property of your grid ONLY once and that is when the page loads for the first time.
Please write the code "grid.DataSource = dataTable;" just before the code "grid.DataBind()" and let me know if it works.

Always make it a habit to set the DataSource of a grid just before calling the DataBind() method on the grid.

E.g. I would always code method like "BindPersonsData()" in my application which would be like -
private void BindPersonsData()
{
grdPersons.DataSource = GetPersons();
grdPersons.DataBind();
}
private DataTable GetPersons()
{
DataTable dt = new DataTable();
//logic to get data
return dt;
}
-------------
Ankur - The Tech Anky
Think Simple, Code Simple, Do Big

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 
GeneralRe: how can get the birthday from database to dropdownlist Pin
Blue_Boy5-May-11 4:49
Blue_Boy5-May-11 4:49 
AnswerRe: how can get the birthday from database to dropdownlist Pin
Sneha Bisht5-May-11 23:21
Sneha Bisht5-May-11 23:21 
GeneralRe: how can get the birthday from database to dropdownlist Pin
lolostar6-May-11 0:23
lolostar6-May-11 0:23 
QuestionLog In Page in ASP.NET with User Type [modified] Pin
GAiXz4-May-11 4:18
GAiXz4-May-11 4:18 
AnswerDuplicate question Pin
thatraja4-May-11 5:26
professionalthatraja4-May-11 5:26 
AnswerRe: Log In Page in ASP.NET with User Type [modified] Pin
Sandeep Mewara4-May-11 6:32
mveSandeep Mewara4-May-11 6:32 
GeneralRe: Log In Page in ASP.NET with User Type Pin
AspDotNetDev4-May-11 6:47
protectorAspDotNetDev4-May-11 6:47 
GeneralRe: Log In Page in ASP.NET with User Type Pin
Sandeep Mewara4-May-11 6:50
mveSandeep Mewara4-May-11 6:50 
Questionhelp me in creating live video chat in asp.net...... Pin
abhijeet66564-May-11 1:29
abhijeet66564-May-11 1:29 

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.