[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

Changing datagrids Headertexts /events in an dynamically created datagrid

Anna Schmidt

2/27/2004 6:34:00 PM

Hello,

I'm currently working on a dynamic generation of a Datagrid (without aspx )
files.

the basic Idea is sending a DataTable to my viewDatagrid class, so the
columns are determined and dates/numbers are formatted, styles are set etc.,
that works fine. so need to define fields in the aspx.files

Everything works fine, except I can't change HeaderTexts of
Datagrid.Columns. Besides, I can't bound events to this dynamic dg2.

viewDataGrid vd = new viewDataGrid(myDatatable);

DataGrid dg2 = new DataGrid();

dg2 = vd .GetDataGrid(); // after formatting a new Datagrid is returend
//databind is already happened.


dg2.Columns[1].HeaderText ="Name"; // doesn't work at all, instead
fieldnames from datatable used instead

dg2.ShowHeader = true; ///-->works fine

dg2.ShowFooter = false; ///-->works fine


this.Controls.Add(dg2); // adding in the pageload methods

I think It's because databinding already happened in the GetDataGrid()
method. but how to change headertexts afterwords? i want to set my
headertexts in the aspx.cs file, not in my Helper-Class ???

Has anyone got an idea, why this doesn't work? and why can i change the
general preferences, but not the data?

Or is there a better solution for dynamically creating a datagrid from a
datatable?

any help is appreciated.

Thankyou as.


5 Answers

Alvin Bruney

2/27/2004 7:38:00 PM

0

when you bind to the datagrid you will need to place code inside the
itemdatabound event handler to adjust the title of the columns.
if(e.item.itemtype == listitem.header)
e.item.cells[0].text = "new header";

roughly

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl...
"Anna Schmidt" <whygohome@gmx.net> wrote in message
news:c1o2ir$1knlbp$1@ID-92243.news.uni-berlin.de...
> Hello,
>
> I'm currently working on a dynamic generation of a Datagrid (without
aspx )
> files.
>
> the basic Idea is sending a DataTable to my viewDatagrid class, so the
> columns are determined and dates/numbers are formatted, styles are set
etc.,
> that works fine. so need to define fields in the aspx.files
>
> Everything works fine, except I can't change HeaderTexts of
> Datagrid.Columns. Besides, I can't bound events to this dynamic dg2.
>
> viewDataGrid vd = new viewDataGrid(myDatatable);
>
> DataGrid dg2 = new DataGrid();
>
> dg2 = vd .GetDataGrid(); // after formatting a new Datagrid is returend
> //databind is already happened.
>
>
> dg2.Columns[1].HeaderText ="Name"; // doesn't work at all, instead
> fieldnames from datatable used instead
>
> dg2.ShowHeader = true; ///-->works fine
>
> dg2.ShowFooter = false; ///-->works fine
>
>
> this.Controls.Add(dg2); // adding in the pageload methods
>
> I think It's because databinding already happened in the GetDataGrid()
> method. but how to change headertexts afterwords? i want to set my
> headertexts in the aspx.cs file, not in my Helper-Class ???
>
> Has anyone got an idea, why this doesn't work? and why can i change the
> general preferences, but not the data?
>
> Or is there a better solution for dynamically creating a datagrid from a
> datatable?
>
> any help is appreciated.
>
> Thankyou as.
>
>


Kickin' Ass and Takin' Names

2/21/2012 12:16:00 PM

0

On Tue, 21 Feb 2012 03:31:50 -0800 (PST), ??????
<p209a11@hot-shot.com> wrote:

>On Feb 21, 6:26?am, Kickin' Ass and Takin' Names
><PopUlist...@hotmail.com> wrote:
>> On Tue, 21 Feb 2012 03:11:33 -0800 (PST), ??????
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> <p209...@hot-shot.com> wrote:
>> >Missouri H.B. 1046:
>>
>> >Quote:
>> >Section A. Sections 115.399 and 115.761, RSMo, are repealed and two
>> >new sections enacted in lieu thereof, to be known as sections 115.399
>> >and 115.761, to read as follows:
>>
>> >115.399. 1. Not later than the twelfth Tuesday prior to each
>> >presidential election, or notwithstanding any prior laws to the
>> >contrary, in the year 1996 and thereafter, within seven working days
>> >after choosing its nominees for president and vice president of the
>> >United States, whichever is later, the state committee of each
>> >established political party shall certify in writing to the secretary
>> >of state the names of its nominees for president and vice president of
>> >the United States. Such certification shall provide verifiable
>> >evidence of identity and of proof of status as a natural born citizen
>> >of the United States for each nominee and the origins of such
>> >evidence. Such evidence shall be in the form of the most complete
>> >record of birth available by the controlling legal authority at the
>> >time of the nominee's birth, and shall be kept and maintained by the
>> >secretary of state, and shall be deemed a public record under chapter
>> >610. The burden of proof for such evidence shall lie solely upon each
>> >nominee. As used in this subsection, "natural born citizen" means
>> >having been declared a national and citizen of the United States at
>> >birth under 8 U.S.C. Sections 1401 to 1409, as amended, or having been
>> >declared a national and citizen of the United States under federal law
>> >as it existed at the time of the nominee's birth.
>>
>> >[...]
>>
>> >4. Failure to provide the certification required under this section
>> >shall render any candidate ineligible to file a declaration of intent
>> >to be a write-in candidate for election to the office of president or
>> >vice president of the United States.
>>
>> >115.761. 1. The official list of presidential candidates for each
>> >established political party shall include the names of all
>> >constitutionally qualified candidates for whom, on or after 8:00 a.m.
>> >on the fifteenth Tuesday prior to the presidential primary, and on or
>> >before 5:00 p.m., on the eleventh Tuesday prior to the presidential
>> >primary, a written request to be included on the presidential primary
>> >ballot is filed with the secretary of state [along with] . Such
>> >written request shall provide verifiable evidence of identity and of
>> >proof of status as a natural born citizen of the United States for
>> >each candidate and the origins of such evidence. Such evidence shall
>> >be in the form of the most complete record of birth available by the
>> >controlling legal authority at the time of the candidate's birth, and
>> >shall be kept and maintained by the secretary of state, and shall be
>> >deemed a public record under chapter 610. The burden of proof for such
>> >evidence shall lie solely upon each candidate. As used in this
>> >subsection, "natural born citizen" means having been declared a
>> >national and citizen of the United States at birth under 8 U.S.C.
>> >Sections 1401 to 1409, as amended, or having been declared a national
>> >and citizen of the United States under federal law as it existed at
>> >the time of the nominee's birth. . . . .
>>
>> So??
>
>"..The burden of proof for such evidence shall lie solely upon each
>candidate....."


So if the candidate presents a birth certificate from another state
and the relevant officials in that state verify the validity of the
document, then, the candidate is on the ballot.

joQ9266b

2/22/2012 12:21:00 AM

0

Summary: Not only the most prolific liar also the most prolific thief
of other's writings. She is also a Stolen Valor stain on America. Note
that when you reply to a Proven Liar you encourage them to continue
lying.

[][][][][][]


The DemocRAT Hall Of Shame http://www.democrathallof... asks
"Why do you always LIE?"

[Courtesy of Buster Norris]

On Tue, 27 Dec 2011 19:51:20 -0800 (PST), "Kickin&amp;amp;#39; Ass and
Takin&amp;amp;#39; Names" <old_redneck@hotmail.com> wrote:
>"Mullah Omar" is dead, you imbecile.
>He was killed by Pakistan's ISI in May and his death was confirmed by
>at least two Taliban official in July.

LIAR!!!!!!!!!!!!!!!!!!!

On 23 May 2011, TOLO News in Afghanistan quoted unnamed sources saying
Omar had been killed by ISI two days earlier. These reports remain
unconfirmed. A spokesman for the militant group said shortly after the
news came out. "Reports regarding the killing of Amir-ul-Moemineen
(Omar) are false. He is safe and sound and is not in Pakistan but
Afghanistan". On 20 July 2011 phone text messages from accounts used
by Taliban spokesmen Zabihullah Mujahid and Qari Mohammad Yousuf
announced Omar's death. Mujahid and Yousuf, however, quickly denied
sending the messages, claimed that their mobile phones, websites, and
email accounts had been hacked, and swore revenge on the telephone
network providers.
http://en.wikipedia.org/wiki/Moh...

Posted from:
The DemocRATs Hall of Shame!
http://www.democrathallof...

Lawrence T. Akutagawa

2/23/2012 11:09:00 PM

0



"Pe??Jay0D ????????a????????" wrote in message
news:90c9fc75-f2f6-4000-a466-ab58f5d75872@e27g2000vbu.googlegroups.com...

On Feb 23, 11:43 am, "Lawrence T. Akutagawa"
<lakuNOS...@sbcglobal.net> wrote:
> "Pe??Jay0D ????????a????????" wrote in message
>
> news:1debf0fa-32cf-4321-94d8-dfc65a8f960b@9g2000yqo.googlegroups.com...
>
> On Feb 23, 3:24 am, "Lawrence T. Akutagawa" <lakuNOS...@sbcglobal.net>
> wrote:
/snip - follow the thread/

> > [chuckle] You need not search Title 8 Section 1405. I've quoted it in
> > its
> > entirety and I do so once again, you clearly not having read it when I
> > first
> > quoted it in this thread:
>
> >http://codes.lp.findlaw.com/uscode/8/12/...
> > ????? 1405. PERSONS BORN IN HAWAII
> > A person born in Hawaii on or after August 12, 1898, and before April
> > 30, 1900, is declared to be a citizen of the United States as of April
> > 30,
> > 1900. A person born in Hawaii on or after April 30, 1900, is a citizen
> > of
> > the
> > United States at birth. A person who was a citizen of the Republic of
> > Hawaii on August 12, 1898, is declared to be a citizen of the United
> > States
> > as
> > of April 30, 1900.???
>
> > So please explain exactly how what Bingham said supercedes US Code Title
> > 18
> > Section 1405 such that we pay attention to him rather than to Section
> > 1405.
> > I've provided my reference - where are yours stating that Bingham's
> > statement has priority of the US Code? Or are you going to once again
> > just
> > exercise your gums?
>
> http://codes.lp.findlaw.com/uscode/8/12/...
>
> " This section is about who is native citizen of the US: birth in US
> territories
> and possessions does not always include citizenship. 'Natural born
> citizen' is a
> different phrase and possibly different concept than 'native born
> citizen'...."
>
> *************
> Dunno where you got your quote from, but it certainly wasn't from your
> cited
> link. Click on your cited link and - guess what? - you get nothing more
> than what I had already quoted....US Code Title 8, Section 1405. It
> reads -
> yet once more for you who evidently don't understand English:
>
> "A person born in Hawaii on or after August 12, 1898, and before
> April 30, 1900, is declared to be a citizen of the United States as
> of April 30, 1900. A person born in Hawaii on or after April 30,
> 1900, is a citizen of the United States at birth. A person who was
> a citizen of the Republic of Hawaii on August 12, 1898, is declared
> to be a citizen of the United States as of April 30, 1900."
>
> So yet once more - please cite your substantiation that Bingham's comment
> supersedes the US Code. Why all this evasion on your part? Having just
> a
> wee bit of problem locating your facts? Do you really like making like a
> duck so much that you can't address this Bingham vs US Code issue?- Hide
> quoted text -
>
> - Show quoted text -

Excerpts from wiki on "Natural Born Citizen" :


"...The Constitution does not define the phrase natural-born citizen,
and various opinions have been offered over time regarding its
precise
meaning. ...


....the Supreme Court has never directly addressed the question of a
specific presidential or vice-presidential candidate's eligibility as
a natural-born citizen...


....The most prominent issue raised against Obama was the claim made
in
several lawsuits that he was not actually born in Hawaii. In two
other
lawsuits, the plaintiffs argued that it was irrelevant whether he was
born in Hawaii,[78] but argued instead that he was nevertheless not a
natural-born citizen because his citizenship status at birth was
governed by the British Nationality Act 1948.[79] The relevant courts
have either denied all applications or declined to render a judgment
due to lack of jurisdiction. Some of the cases have been dismissed
because of the plaintiff's lack of standing..."
*****
By golly, another non sequitur. Your continual outpouring of red herrings
reminds me of Jerry Okamura.

I ask again, O mighty duck....cite references/links where what Bingham said
supersedes the US Code. Now are you going to again duck/evade/avoid the
issue?



Lawrence T. Akutagawa

2/24/2012 9:16:00 PM

0

"Lawrence T. Akutagawa" wrote in message news:ji6gu5$jtq$1@dont-email.me...

"Pe??Jay0D ????????a????????" wrote in message
news:90c9fc75-f2f6-4000-a466-ab58f5d75872@e27g2000vbu.googlegroups.com...

On Feb 23, 11:43 am, "Lawrence T. Akutagawa"
<lakuNOS...@sbcglobal.net> wrote:

/snip - follow the thread/

> *************
> Dunno where you got your quote from, but it certainly wasn't from your
> cited
> link. Click on your cited link and - guess what? - you get nothing more
> than what I had already quoted....US Code Title 8, Section 1405. It
> reads -
> yet once more for you who evidently don't understand English:
>
> "A person born in Hawaii on or after August 12, 1898, and before
> April 30, 1900, is declared to be a citizen of the United States as
> of April 30, 1900. A person born in Hawaii on or after April 30,
> 1900, is a citizen of the United States at birth. A person who was
> a citizen of the Republic of Hawaii on August 12, 1898, is declared
> to be a citizen of the United States as of April 30, 1900."
>
> So yet once more - please cite your substantiation that Bingham's comment
> supersedes the US Code. Why all this evasion on your part? Having just
> a
> wee bit of problem locating your facts? Do you really like making like a
> duck so much that you can't address this Bingham vs US Code issue?- Hide
> quoted text -
>
> - Show quoted text -

Excerpts from wiki on "Natural Born Citizen" :


"...The Constitution does not define the phrase natural-born citizen,
and various opinions have been offered over time regarding its
precise
meaning. ...


....the Supreme Court has never directly addressed the question of a
specific presidential or vice-presidential candidate's eligibility as
a natural-born citizen...


....The most prominent issue raised against Obama was the claim made
in
several lawsuits that he was not actually born in Hawaii. In two
other
lawsuits, the plaintiffs argued that it was irrelevant whether he was
born in Hawaii,[78] but argued instead that he was nevertheless not a
natural-born citizen because his citizenship status at birth was
governed by the British Nationality Act 1948.[79] The relevant courts
have either denied all applications or declined to render a judgment
due to lack of jurisdiction. Some of the cases have been dismissed
because of the plaintiff's lack of standing..."
*****
By golly, another non sequitur. Your continual outpouring of red herrings
reminds me of Jerry Okamura.

I ask again, O mighty duck....cite references/links where what Bingham said
supersedes the US Code. Now are you going to again duck/evade/avoid the
issue?

****
Yoo hoo - you there? Do you have solid, verifiable substantiation that what
Bingham said does indeed supersede the US Code? Where o where are your
links/references/citations that Bingham's statement and not the US Code is
the law of the land? Anything of a verifiable nature as per Bingham vis a
vis the US Code to show that what you have not been just beating your gums?
Have you crawled under a rock the way Jerry Okamura does when HIS hot air is
shown to be nothing but hot air? Hope you like it under that rock!