473,778 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid control

Is the datagrid control sort and paging commands work only when both the
page and grid property EnableViuewStat e=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.
Nov 18 '05 #1
7 1148
you just need to manually map in the page load if viewstate is set to false
datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
news:uR******** ******@TK2MSFTN GP09.phx.gbl...
Is the datagrid control sort and paging commands work only when both the
page and grid property EnableViuewStat e=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.

Nov 18 '05 #2
z f
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSor tCommand (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
news:O5******** ******@TK2MSFTN GP10.phx.gbl...
you just need to manually map in the page load if viewstate is set to false datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
news:uR******** ******@TK2MSFTN GP09.phx.gbl...
Is the datagrid control sort and paging commands work only when both the
page and grid property EnableViuewStat e=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.


Nov 18 '05 #3
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" <zi**@info-scope.co.il> wrote in message
news:eh******** ******@TK2MSFTN GP12.phx.gbl...
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSor tCommand (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
news:O5******** ******@TK2MSFTN GP10.phx.gbl...
you just need to manually map in the page load if viewstate is set to

false
datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
news:uR******** ******@TK2MSFTN GP09.phx.gbl...
> Is the datagrid control sort and paging commands work only when both
> the
> page and grid property EnableViuewStat e=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.
>
>



Nov 18 '05 #4
z f
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
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <zi**@info-scope.co.il> wrote in message
news:eh******** ******@TK2MSFTN GP12.phx.gbl...
sorry for not understanding but, this is VB and the handler looks like
function ....... handles datagrid1.OnSor tCommand (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
news:O5******** ******@TK2MSFTN GP10.phx.gbl...
you just need to manually map in the page load if viewstate is set to

false
datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
news:uR******** ******@TK2MSFTN GP09.phx.gbl...
> Is the datagrid control sort and paging commands work only when both
> the
> page and grid property EnableViuewStat e=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.
>
>



Nov 18 '05 #5
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" <zi**@info-scope.co.il> wrote in message
news:eQ******** ******@tk2msftn gp13.phx.gbl...
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
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <zi**@info-scope.co.il> wrote in message
news:eh******** ******@TK2MSFTN GP12.phx.gbl...
> sorry for not understanding but, this is VB and the handler looks like
> function ....... handles datagrid1.OnSor tCommand (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
> news:O5******** ******@TK2MSFTN GP10.phx.gbl...
>> you just need to manually map in the page load if viewstate is set to
> false
>> datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
>> news:uR******** ******@TK2MSFTN GP09.phx.gbl...
>> > Is the datagrid control sort and paging commands work only when both
>> > the
>> > page and grid property EnableViuewStat e=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.
>> >
>> >
>>
>>
>
>



Nov 18 '05 #6
z f
is should manually rebind it in the page_load event and not from the
InitializeCompo nent that is called from the OnInit method?

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:uw******** ******@TK2MSFTN GP09.phx.gbl...
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" <zi**@info-scope.co.il> wrote in message
news:eQ******** ******@tk2msftn gp13.phx.gbl...
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
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <zi**@info-scope.co.il> wrote in message
news:eh******** ******@TK2MSFTN GP12.phx.gbl...
> sorry for not understanding but, this is VB and the handler looks like > function ....... handles datagrid1.OnSor tCommand (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
> news:O5******** ******@TK2MSFTN GP10.phx.gbl...
>> you just need to manually map in the page load if viewstate is set to > false
>> datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
>> news:uR******** ******@TK2MSFTN GP09.phx.gbl...
>> > Is the datagrid control sort and paging commands work only when both >> > the
>> > page and grid property EnableViuewStat e=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.
>> >
>> >
>>
>>
>
>



Nov 18 '05 #7
right
page_load
{
if(!page.ispost back)
{
}

//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" <zi**@info-scope.co.il> wrote in message
news:u$******** *****@tk2msftng p13.phx.gbl...
is should manually rebind it in the page_load event and not from the
InitializeCompo nent that is called from the OnInit method?

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:uw******** ******@TK2MSFTN GP09.phx.gbl...
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" <zi**@info-scope.co.il> wrote in message
news:eQ******** ******@tk2msftn gp13.phx.gbl...
> 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
> news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
>> 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" <zi**@info-scope.co.il> wrote in message
>> news:eh******** ******@TK2MSFTN GP12.phx.gbl...
>> > sorry for not understanding but, this is VB and the handler looks like >> > function ....... handles datagrid1.OnSor tCommand (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
>> > news:O5******** ******@TK2MSFTN GP10.phx.gbl...
>> >> you just need to manually map in the page load if viewstate is set to >> > false
>> >> datagrid1.sortc ommand += 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." <zi**@info-scopeREMSPAM.co .il> wrote in message
>> >> news:uR******** ******@TK2MSFTN GP09.phx.gbl...
>> >> > Is the datagrid control sort and paging commands work only when both >> >> > the
>> >> > page and grid property EnableViuewStat e=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.
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2598
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order date, name, address etc) about the selected row in the datagrid... My problem is when I enter a new record in the details tabpage (saves data to database), and go back to the datagrid. Only the data from the PM-table
2
2675
by: Carolyn Vo | last post by:
I have been looking and looking but can't seem to find out how to get the row selected in a web control datagrid (NOT a web form datagrid!!!), and how to highlight the selected row. I'm sure this question comes up all the time but I can't find the solution(s) anywhere. From what I understand, the web control datagrid doesn't have any row selected or row highlighting capabilities. What kind of hack am I going to have to put into place?...
3
5046
by: Ryan Liu | last post by:
Hi there, I got a NullReferenceException when delete last row in a datagrid. I had hard time to solve since it does not occur in my own code. I put a datagrid in my inherited user control, then put this control on a form. I use DataAdaptor to fill the data table and update database.
2
17032
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of the columns of the data grid contains a DropDownlist. I managed to create this datagrid control as follows.
4
5357
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. Currently everything is working. I can find the updated rows/columns by parsing the posted data collection against the DataGrid DataSource. However, when there is a large amount of DataGridItems (rows) the update processing can take a while. ...
3
4885
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
1
5291
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so the user doesn't have to scroll horizontally. Essentially, I want to wrap a datagrid row (not text in individual columns) with as much control as possible. Make sense? While this seems simple enough on the surface, I can't figure out how to do...
1
2126
by: thegame | last post by:
Filling One DataGrid Based on Selection from Another DataGrid - Both in Separate User Controls Hello, I have an interesting dilemma. I have an ASPX page with two user controls (two ASCXs). Both ASCXs have DataGrids on them. The first user control's DataGrid is populated from our database on page load. The DataGrid also has a Select LinkButton.
13
2496
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for them. In a plain vanilla DataGrid, when you click on the RowHeader, the appropriate row changes colors. I ASSUME this should be done in the Paint (or PaintText) override of the DataGridColumnStyle in question. My problem is that I don't know...
3
7222
by: chreo | last post by:
Hello. I have datagrid. I found code to select all row in data grid (by mouse or arrow keys). This works great - user can select row and... ....and I want to go to next control. For example: User writes something in textbox - then hits TAB to go to datagrid...
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9470
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8957
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7475
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.