Hi,
I have a gridview (2.0), in the page load I remove a couple of columns from
the gridview which I dont need.
(All the columns are databound)
This works fine. But after a postback all the templatefields are not bind
anymore.
Only the boundfields are still bound.
Why? and what can I do about this?
Many thanks,
Page_Load:
If Not IsPostBack Then
'Loop to remove the extra columns we dont need:
end if 7 1356
If you don't need them, remove from the design. This may actually help
resolve your main issue.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Maarten" <Pa****@mayo.com> wrote in message
news:uH**************@tk2msftngp13.phx.gbl... Hi,
I have a gridview (2.0), in the page load I remove a couple of columns from the gridview which I dont need. (All the columns are databound) This works fine. But after a postback all the templatefields are not bind anymore. Only the boundfields are still bound. Why? and what can I do about this?
Many thanks,
Page_Load:
If Not IsPostBack Then
'Loop to remove the extra columns we dont need:
end if
Hi Christopher,
I understand that, but that's no option.
I only know which one to remove at run-time, due to user selection.
And not at design-time!
"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl... If you don't need them, remove from the design. This may actually help resolve your main issue. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Maarten" <Pa****@mayo.com> wrote in message news:uH**************@tk2msftngp13.phx.gbl... Hi,
I have a gridview (2.0), in the page load I remove a couple of columns from the gridview which I dont need. (All the columns are databound) This works fine. But after a postback all the templatefields are not bind anymore. Only the boundfields are still bound. Why? and what can I do about this?
Many thanks,
Page_Load:
If Not IsPostBack Then
'Loop to remove the extra columns we dont need:
end if
Then, are you building your GridView in the Page_Load? If so, make sure the
call to the DataBind method is not inside the If (!IsPostBack) clause.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl... Hi Christopher,
I understand that, but that's no option. I only know which one to remove at run-time, due to user selection. And not at design-time!
"Christopher Reed" <ca****@nospam.nospam> wrote in message news:eV**************@TK2MSFTNGP09.phx.gbl... If you don't need them, remove from the design. This may actually help resolve your main issue. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Maarten" <Pa****@mayo.com> wrote in message news:uH**************@tk2msftngp13.phx.gbl... Hi,
I have a gridview (2.0), in the page load I remove a couple of columns from the gridview which I dont need. (All the columns are databound) This works fine. But after a postback all the templatefields are not bind anymore. Only the boundfields are still bound. Why? and what can I do about this?
Many thanks,
Page_Load:
If Not IsPostBack Then
'Loop to remove the extra columns we dont need:
end if
No, I am not doing that. It's already databound in design time(see OP)
It is bound through a ObjectDataSources.
"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl... Then, are you building your GridView in the Page_Load? If so, make sure the call to the DataBind method is not inside the If (!IsPostBack) clause. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message news:eu**************@TK2MSFTNGP12.phx.gbl... Hi Christopher,
I understand that, but that's no option. I only know which one to remove at run-time, due to user selection. And not at design-time!
"Christopher Reed" <ca****@nospam.nospam> wrote in message news:eV**************@TK2MSFTNGP09.phx.gbl... If you don't need them, remove from the design. This may actually help resolve your main issue. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Maarten" <Pa****@mayo.com> wrote in message news:uH**************@tk2msftngp13.phx.gbl... Hi,
I have a gridview (2.0), in the page load I remove a couple of columns from the gridview which I dont need. (All the columns are databound) This works fine. But after a postback all the templatefields are not bind anymore. Only the boundfields are still bound. Why? and what can I do about this?
Many thanks,
Page_Load:
If Not IsPostBack Then
'Loop to remove the extra columns we dont need:
end if
Then, anytime you make a change to the GridView, you have to DataBind it
again.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message
news:em**************@TK2MSFTNGP14.phx.gbl... No, I am not doing that. It's already databound in design time(see OP) It is bound through a ObjectDataSources. "Christopher Reed" <ca****@nospam.nospam> wrote in message news:OF**************@TK2MSFTNGP09.phx.gbl... Then, are you building your GridView in the Page_Load? If so, make sure the call to the DataBind method is not inside the If (!IsPostBack) clause. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message news:eu**************@TK2MSFTNGP12.phx.gbl... Hi Christopher,
I understand that, but that's no option. I only know which one to remove at run-time, due to user selection. And not at design-time!
"Christopher Reed" <ca****@nospam.nospam> wrote in message news:eV**************@TK2MSFTNGP09.phx.gbl... If you don't need them, remove from the design. This may actually help resolve your main issue. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Maarten" <Pa****@mayo.com> wrote in message news:uH**************@tk2msftngp13.phx.gbl... > Hi, > > I have a gridview (2.0), in the page load I remove a couple of columns > from the gridview which I dont need. > (All the columns are databound) > This works fine. But after a postback all the templatefields are not > bind anymore. > Only the boundfields are still bound. > Why? and what can I do about this? > > > Many thanks, > > Page_Load: > > If Not IsPostBack Then > > 'Loop to remove the extra columns we dont need: > > end if >
I will try that, thank you!
"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Then, anytime you make a change to the GridView, you have to DataBind it again. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message news:em**************@TK2MSFTNGP14.phx.gbl... No, I am not doing that. It's already databound in design time(see OP) It is bound through a ObjectDataSources. "Christopher Reed" <ca****@nospam.nospam> wrote in message news:OF**************@TK2MSFTNGP09.phx.gbl... Then, are you building your GridView in the Page_Load? If so, make sure the call to the DataBind method is not inside the If (!IsPostBack) clause. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message news:eu**************@TK2MSFTNGP12.phx.gbl... Hi Christopher,
I understand that, but that's no option. I only know which one to remove at run-time, due to user selection. And not at design-time!
"Christopher Reed" <ca****@nospam.nospam> wrote in message news:eV**************@TK2MSFTNGP09.phx.gbl... > If you don't need them, remove from the design. This may actually > help resolve your main issue. > -- > Christopher A. Reed > "The oxen are slow, but the earth is patient." > > "Maarten" <Pa****@mayo.com> wrote in message > news:uH**************@tk2msftngp13.phx.gbl... >> Hi, >> >> I have a gridview (2.0), in the page load I remove a couple of >> columns from the gridview which I dont need. >> (All the columns are databound) >> This works fine. But after a postback all the templatefields are not >> bind anymore. >> Only the boundfields are still bound. >> Why? and what can I do about this? >> >> >> Many thanks, >> >> Page_Load: >> >> If Not IsPostBack Then >> >> 'Loop to remove the extra columns we dont need: >> >> end if >> > >
Nope, not working either
"Pipo" <Pa****@Mayo.com> wrote in message
news:uy*************@TK2MSFTNGP05.phx.gbl... I will try that, thank you!
"Christopher Reed" <ca****@nospam.nospam> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl... Then, anytime you make a change to the GridView, you have to DataBind it again. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message news:em**************@TK2MSFTNGP14.phx.gbl... No, I am not doing that. It's already databound in design time(see OP) It is bound through a ObjectDataSources. "Christopher Reed" <ca****@nospam.nospam> wrote in message news:OF**************@TK2MSFTNGP09.phx.gbl... Then, are you building your GridView in the Page_Load? If so, make sure the call to the DataBind method is not inside the If (!IsPostBack) clause. -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Pipo" <Pa****@Mayo.com> wrote in message news:eu**************@TK2MSFTNGP12.phx.gbl... > Hi Christopher, > > I understand that, but that's no option. > I only know which one to remove at run-time, due to user selection. > And not at design-time! > > > > > "Christopher Reed" <ca****@nospam.nospam> wrote in message > news:eV**************@TK2MSFTNGP09.phx.gbl... >> If you don't need them, remove from the design. This may actually >> help resolve your main issue. >> -- >> Christopher A. Reed >> "The oxen are slow, but the earth is patient." >> >> "Maarten" <Pa****@mayo.com> wrote in message >> news:uH**************@tk2msftngp13.phx.gbl... >>> Hi, >>> >>> I have a gridview (2.0), in the page load I remove a couple of >>> columns from the gridview which I dont need. >>> (All the columns are databound) >>> This works fine. But after a postback all the templatefields are not >>> bind anymore. >>> Only the boundfields are still bound. >>> Why? and what can I do about this? >>> >>> >>> Many thanks, >>> >>> Page_Load: >>> >>> If Not IsPostBack Then >>> >>> 'Loop to remove the extra columns we dont need: >>> >>> end if >>> >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: prashant |
last post by:
Hi,
I have set up transactional replication with queued updation. But I
want to make sure that identical columns dont get replicated. For that,
I wanted to make all identical columns in all the...
|
by: J055 |
last post by:
Hi
I have a very simple configuration of the GridView with paging and sorting.
When I do a postback the DataBinding event fires twice - in both the
ProcessPostData and PreRender stages of the...
|
by: SMichal |
last post by:
Is there some posibility how to bind a nested classes to GridView ?
class BLZ
{
public string name;
public string text;
}
class Konto
{
|
by: satchi |
last post by:
Hi, I'm having trouble figuring out how to conditionally bind a GridView to an sqldatasource depending on the user's input to a TextBox and selecting the field to search by, in a DropDownList...
|
by: tarscher |
last post by:
Hi all,
A simple problem that seems hard to solve...
I have a gridview with a date row.
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("time")
%>'></asp:Label>...
|
by: new2the |
last post by:
i am using gridview to show data from a mysql database using a adapter and the fill command but when i run it the last row is missing the last data ( a string) all other rows is working fine.
|
by: aj123 |
last post by:
Hello ;
I added grid view in my web project
and added buttun feild and covert it to template feild
and every thing works ok
protected void Grid1_Command(object sender,...
|
by: Jay Pondy |
last post by:
Given the following List(of Position) objects for an ObjectDataSource
Position
Description
EmployeeA
FirstName
LastName
EmployeeB
FirstName
LastName
|
by: ata |
last post by:
Hi folks,
Consider a gridview that's being bound to a ObjectDataSource that uses
an adapter to handle data access logic.
1. How am I supposed to have a RowIndex column *without* modifying the...
|
by: Mel |
last post by:
I have a GridView that is bound to a DataTable. I decided to allow
the user to change the column data right in the ItemTemplate. Then
user won't need to click Edit to change the values and then...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |