First, excuse me for my very bad English.
I need your help for using DataGrid.Column s[..].HeaderText
I have a DataGrid in WebForm . I have a Session variable "LANGUAGE " in wich
I storing values ENG or FR.
On the page I have 2 linkButtons for the 2 languages - when the user click
on the the button, the form is initialize with the language.
Everything is OK, except initializing of the HeaderText of the DataGrid. I
try many methods for initialize - in Page_Load, in PreRender, in
ItemDataBound etc. events,
But the the HeaderText cant receive the right value . Example:
In prerender event I have break point . Session variable in this moment is
"ENG" , and I see in the debbuger that the header text receive the right
value in English, but when the page is loaded - the value is on french. If
AFTER THAT I click FR link button , in prerender event the value of Se3ssion
variable is FR, the value of Headertext is on french, but when the page is
loaded - value is on English . In conclusion : in Prerender, ItemDataBound
etc. events - in the debugger everything is OK with right values, but when
the page is loaded the values of HeaderText properties is on the previous
lanuage :
Please if you can help me - write me !
Best regards !
Toma 2 2294
Toma,
This sounds for me if the datagrid.databi nd happens to early
Just an idea about something that once was happening me in past
Cor
Thank you very much Cor!!!
Your opinion was like flash for me ...Really, the problem was that I make
DataGrid.DataBi nd in the Page_Load, and in language linkbutton event I'm
trying only to change the HeaderText of the grid columns /without any other
initializing/...Maybe I can't explain well the situation, but thanks to you I
found the solution....
Thanks again !
Best regards ,
Toma
"Cor Ligthert [MVP]" wrote: Toma,
This sounds for me if the datagrid.databi nd happens to early
Just an idea about something that once was happening me in past
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lu |
last post by:
I have a page with datagrid (for viewing,
delete,edit,update) and text fields with button to add
info to database.
When user comes to page the datagrid selects info from
database, binds in columns, and adds a delete buttoncolumn
and editcommandcolumn. Below that, I have several text
boxes with a button with an onclick event to add new...
|
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?
|
by: Marty McDonald |
last post by:
When setting certain datagrid properties with the IDE (as in the property
window), they don't seem to take effect. For instance, Font Name. So I
have to set these via code-behind at the cell level. Is this expected?
Shouldn't anything on the properties window render accordingly? Thanks
|
by: Ben |
last post by:
Hi, I'm wondering how can i change the datagrid header text at runtime so
that it keeps the sorting enabled?
I can do;
e.Item.Cells.Text = "foo";
But then foo is the text of the table cell and not the underlying hyperlink
and as such, foo is no longer sortable.
|
by: tshad |
last post by:
Is there a way to carry data that I have already read from the datagrid from
page to page?
I am looking at my Datagrid that I page through and when the user says get
the next page, I have to go to the database to get the next page. Is there
a way to use the dataset to allow us to read back and forth in it instead of
going back to the...
| |
by: Gunjan Garg |
last post by:
Hello All,
I am working to create a generic datagrid which accepts a
datasource(ListData - This is our own datatype) and depending on the calling
program customizes itself for sorting, paginantion or accepting the add and
remove item events.
What i am observing is that none of the vents are happening... (Sort, page,
or item). I am sure I...
|
by: Mike Baugh |
last post by:
I am using visual studio 2005 to develop a form using c#
I have 3 datagrids on one form.
I can set the row color based on a certain value in a column. However this
color applies to all 3 datagrida. I would like to set it so that
if value of column 3 in datagrid 1 is < 100 set to red, if = 100 set to green
if value of column 3 in...
|
by: rn5a |
last post by:
A SqlDataReader is populated with the records from a SQL Server 2005 DB
table. The records retrieved depends upon 2 conditions (the conditions
depend on what a user selects in an ASPX page). If condition1 is true,
then the SqlDataReader will be populated with the records existing in
table1 & will return 0 to the calling function but if...
|
by: whidbey |
last post by:
Hello frnds,
I have created a datagrid with the following code......
<asp:datagrid id="DataGrid1" BackColor="#ccccff" BorderColor="black" Width="750" Runat="server" AutoGenerateColumns="False" HeaderStyle-BackColor="#aaaadd" Font-Size="8pt" Font-Name="Verdana" CellSpacing="0" CellPadding="3" ShowFooter="True" GridLines="None"...
|
by: rupalirane07 |
last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error:
NullReferenceException error
Any help........pls urgent
=========================================================
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb"...
|
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...
| |
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...
|
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. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |