datagrid control

  • Thread starter Thread starter z. f.
  • Start date Start date
Z

z. f.

Is the datagrid control sort and paging commands work only when both the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to false the
sorting or paging didn't work. i just got an black page and the commands
methods was not called.

I really wish i can work with the grid without the viewstate, performance
best practices recommend not to use view state.


TIA, z.
 
you just need to manually map in the page load if viewstate is set to false
datagrid1.sortcommand += point to the sort command handler routine
 
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSortCommand (might be a little
different)

and in the V code there is no additions to the objects event handler like in
C#, so should i do it also in VB?



Alvin Bruney said:
you just need to manually map in the page load if viewstate is set to false
datagrid1.sortcommand += point to the sort command handler routine

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z. f. said:
Is the datagrid control sort and paging commands work only when both the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to false the
sorting or paging didn't work. i just got an black page and the commands
methods was not called.

I really wish i can work with the grid without the viewstate, performance
best practices recommend not to use view state.


TIA, z.
 
ya vb does it differently. you will need a vb person in here to help with
the code

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSortCommand (might be a little
different)

and in the V code there is no additions to the objects event handler like
in
C#, so should i do it also in VB?



Alvin Bruney said:
you just need to manually map in the page load if viewstate is set to false
datagrid1.sortcommand += point to the sort command handler routine

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z. f. said:
Is the datagrid control sort and paging commands work only when both
the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to false the
sorting or paging didn't work. i just got an black page and the
commands
methods was not called.

I really wish i can work with the grid without the viewstate, performance
best practices recommend not to use view state.


TIA, z.
 
so must i have the EnableViewState=True in order to receive the grid events?




Alvin Bruney said:
ya vb does it differently. you will need a vb person in here to help with
the code

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSortCommand (might be a little
different)

and in the V code there is no additions to the objects event handler like
in
C#, so should i do it also in VB?



Alvin Bruney said:
you just need to manually map in the page load if viewstate is set to false
datagrid1.sortcommand += point to the sort command handler routine

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Is the datagrid control sort and paging commands work only when both
the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to
false
the
sorting or paging didn't work. i just got an black page and the
commands
methods was not called.

I really wish i can work with the grid without the viewstate, performance
best practices recommend not to use view state.


TIA, z.
 
no it should be false, which is why you have to manually rebind it in the
page_load event each time.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
so must i have the EnableViewState=True in order to receive the grid
events?




Alvin Bruney said:
ya vb does it differently. you will need a vb person in here to help with
the code

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSortCommand (might be a little
different)

and in the V code there is no additions to the objects event handler like
in
C#, so should i do it also in VB?



"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
you just need to manually map in the page load if viewstate is set to
false
datagrid1.sortcommand += point to the sort command handler routine

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Is the datagrid control sort and paging commands work only when both
the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to false
the
sorting or paging didn't work. i just got an black page and the
commands
methods was not called.

I really wish i can work with the grid without the viewstate,
performance
best practices recommend not to use view state.


TIA, z.
 
right
page_load
{
if(!page.ispostback)
{
}

//rebind grid here
}


--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
is should manually rebind it in the page_load event and not from the
InitializeComponent that is called from the OnInit method?



Alvin Bruney said:
no it should be false, which is why you have to manually rebind it in the
page_load event each time.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
so must i have the EnableViewState=True in order to receive the grid
events?




"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
ya vb does it differently. you will need a vb person in here to help with
the code

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSortCommand (might be a little
different)

and in the V code there is no additions to the objects event handler
like
in
C#, so should i do it also in VB?



"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in
message
you just need to manually map in the page load if viewstate is set to
false
datagrid1.sortcommand += point to the sort command handler routine

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Is the datagrid control sort and paging commands work only when both
the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to
false
the
sorting or paging didn't work. i just got an black page and the
commands
methods was not called.

I really wish i can work with the grid without the viewstate,
performance
best practices recommend not to use view state.


TIA, z.
 
is should manually rebind it in the page_load event and not from the
InitializeComponent that is called from the OnInit method?



Alvin Bruney said:
no it should be false, which is why you have to manually rebind it in the
page_load event each time.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
z f said:
so must i have the EnableViewState=True in order to receive the grid
events?




Alvin Bruney said:
ya vb does it differently. you will need a vb person in here to help with
the code

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSortCommand (might be a little
different)

and in the V code there is no additions to the objects event handler like
in
C#, so should i do it also in VB?



"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
you just need to manually map in the page load if viewstate is set to
false
datagrid1.sortcommand += point to the sort command handler routine

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Is the datagrid control sort and paging commands work only when both
the
page and grid property EnableViuewState=True ?

when i tryed running the page when either one of them was set to false
the
sorting or paging didn't work. i just got an black page and the
commands
methods was not called.

I really wish i can work with the grid without the viewstate,
performance
best practices recommend not to use view state.


TIA, z.
 
Back
Top