473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Controls in HeaderTemplate

Hi!

Does anyone know how to get the text in textbox field which is in
HeaderTemplate of a DataGrid?
In the following code, I can not get text of "tbName". I typed something in
that box. I can get
tbName control but the text is empty.

Thanks a lot!

Yan

==================== asp ===============================================
<asp:datagrid Autogeneratecolumns="false" id="dgList" runat="server"
DataKeyField="ID">
<Columns>
<asp:TemplateColumn>
<ItemStyle></ItemStyle>
<ItemTemplate>
<asp:LinkButton Runat="server" CommandName="OnNameClicked">
<%# DataBinder.Eval(Container.DataItem, "NAME") %>
</asp:LinkButton>
</ItemTemplate>
<HeaderTemplate>
<table>
<tr>
<td>
<asp:LinkButton Runat="server" ID="btName"
OnCommand="OnNameSortClicked" CommandArgument="NAME">Name</asp:LinkButton>
<asp:Label Runat="server" ID="lbNameSort"></asp:Label>
</td>
<tr>
<td>
<asp:TextBox Runat="server" ID="tbName"
EnableViewState="True"></asp:TextBox>
</td>
</tr>
</table>
</HeaderTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
========================= sever =======================================
public void OnItemDataBound(object sender, DataGridItemEventArgs e) {
if (e.Item.ItemType == ListItemType.Header) {
for (int i = 0; i < m_dgList.Columns.Count; ++i) {
Control aControl = null;
if (e.Item.Cells[i].HasControls()) {
aControl = e.Item.Cells[i].FindControl("tbName");
if (aControl != null) {
TextBox tbTemp = (TextBox)aControl; // I
reach here
if (tbTemp.Text != null && tbTemp.Text.Length > 0) {
tbTemp.Text = "Got it!";
//never reach here!!!!
}
}
}
}
}
}
Nov 18 '05 #1
5 2267
Hi, Yan Wang,

The condition

if (tbTemp.Text != null && tbTemp.Text.Length > 0)

is supposed to be false on the first request (when IsPostBack is false)
because the control is added like this:

<asp:TextBox Runat="server" ID="tbName" EnableViewState="True"/>

Try to set the Text property in order to make the condition if (tbTemp.Text
!= null && tbTemp.Text.Length > 0) true.

Hope this helps
Martin

"Yan Wang" <yw*******@shaw.ca> wrote in message
news:RL3hc.186759$oR5.176815@pd7tw3no...
Hi!

Does anyone know how to get the text in textbox field which is in
HeaderTemplate of a DataGrid?
In the following code, I can not get text of "tbName". I typed something in that box. I can get
tbName control but the text is empty.

Thanks a lot!

Yan

==================== asp ===============================================
<asp:datagrid Autogeneratecolumns="false" id="dgList" runat="server"
DataKeyField="ID">
<Columns>
<asp:TemplateColumn>
<ItemStyle></ItemStyle>
<ItemTemplate>
<asp:LinkButton Runat="server" CommandName="OnNameClicked">
<%# DataBinder.Eval(Container.DataItem, "NAME") %>
</asp:LinkButton>
</ItemTemplate>
<HeaderTemplate>
<table>
<tr>
<td>
<asp:LinkButton Runat="server" ID="btName"
OnCommand="OnNameSortClicked" CommandArgument="NAME">Name</asp:LinkButton>
<asp:Label Runat="server" ID="lbNameSort"></asp:Label>
</td>
<tr>
<td>
<asp:TextBox Runat="server" ID="tbName"
EnableViewState="True"></asp:TextBox>
</td>
</tr>
</table>
</HeaderTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
========================= sever =======================================
public void OnItemDataBound(object sender, DataGridItemEventArgs e) {
if (e.Item.ItemType == ListItemType.Header) {
for (int i = 0; i < m_dgList.Columns.Count; ++i) {
Control aControl = null;
if (e.Item.Cells[i].HasControls()) {
aControl = e.Item.Cells[i].FindControl("tbName");
if (aControl != null) {
TextBox tbTemp = (TextBox)aControl; // I
reach here
if (tbTemp.Text != null && tbTemp.Text.Length > 0) {
tbTemp.Text = "Got it!";
//never reach here!!!!
}
}
}
}
}
}

Nov 18 '05 #2
Hi!

You are right. But still I can not solve the problem. I try to catch
"OnItemDataBound" event is only raised when IsPostBack is true.
Same as OnItemCreate event. So I still can not get the text which I typed
in. I also notice, I can not make tbName instantialize
at codebhind class.(I use "protected TextBox tbName;" in class, it is always
NULL).
Is that because MS only want all stuff in datagrid to be shown to page only?
Any idea how to get content of textbox in
HeaderTemplate but that content is what typed from user not from program? Or
I have to go back as normal html input tag for
that textbox?

Thanks for your help!

Yan

"Martin Dechev" <de*******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
Hi, Yan Wang,

The condition

if (tbTemp.Text != null && tbTemp.Text.Length > 0)

is supposed to be false on the first request (when IsPostBack is false)
because the control is added like this:

<asp:TextBox Runat="server" ID="tbName" EnableViewState="True"/>

Try to set the Text property in order to make the condition if (tbTemp.Text != null && tbTemp.Text.Length > 0) true.

Hope this helps
Martin

"Yan Wang" <yw*******@shaw.ca> wrote in message
news:RL3hc.186759$oR5.176815@pd7tw3no...
Hi!

Does anyone know how to get the text in textbox field which is in
HeaderTemplate of a DataGrid?
In the following code, I can not get text of "tbName". I typed something

in
that box. I can get
tbName control but the text is empty.

Thanks a lot!

Yan

==================== asp ===============================================
<asp:datagrid Autogeneratecolumns="false" id="dgList" runat="server"
DataKeyField="ID">
<Columns>
<asp:TemplateColumn>
<ItemStyle></ItemStyle>
<ItemTemplate>
<asp:LinkButton Runat="server" CommandName="OnNameClicked">
<%# DataBinder.Eval(Container.DataItem, "NAME") %>
</asp:LinkButton>
</ItemTemplate>
<HeaderTemplate>
<table>
<tr>
<td>
<asp:LinkButton Runat="server" ID="btName"
OnCommand="OnNameSortClicked" CommandArgument="NAME">Name</asp:LinkButton> <asp:Label Runat="server" ID="lbNameSort"></asp:Label>
</td>
<tr>
<td>
<asp:TextBox Runat="server" ID="tbName"
EnableViewState="True"></asp:TextBox>
</td>
</tr>
</table>
</HeaderTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
========================= sever =======================================
public void OnItemDataBound(object sender, DataGridItemEventArgs e) {
if (e.Item.ItemType == ListItemType.Header) {
for (int i = 0; i < m_dgList.Columns.Count; ++i) {
Control aControl = null;
if (e.Item.Cells[i].HasControls()) {
aControl = e.Item.Cells[i].FindControl("tbName");
if (aControl != null) {
TextBox tbTemp = (TextBox)aControl; // I
reach here
if (tbTemp.Text != null && tbTemp.Text.Length > 0) {
tbTemp.Text = "Got it!";
//never reach here!!!!
}
}
}
}
}
}


Nov 18 '05 #3
Hi, Yan,

Maybe this code can help you because it is working for me:

Listing <test.aspx>:

<%@ Page language="C#" inherits="test_aspx" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
</head>
<body>
<form id="form1" method="post" runat="server">
<asp:datagrid id="DataGrid1" runat="server"
autogeneratecolumns="False" onitemcreated="DataGrid1_ItemCreated">
<columns>
<asp:templatecolumn>
<itemtemplate>
<asp:linkbutton runat="server" commandname="OnNameClicked" id="Linkbutton1">
<%# DataBinder.Eval(Container.DataItem, "column1") %>
</asp:linkbutton>
</itemtemplate>
<headertemplate>
<table>
<tr>
<td>
<asp:textbox runat="server" id="tbName"
enableviewstate="True"/>
</td>
</tr>
</table>
</headertemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
</form>
</body>
</html>

Listing <test_aspx.cs>:

using System;

public class test_aspx : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;

protected void Page_Load(object s, EventArgs e)
{
if(!IsPostBack)
{
System.Data.DataTable dt =
new System.Data.DataTable();
System.Data.DataRow dr;
dt.Columns.Add("column1", typeof(string));
dr = dt.NewRow();
dr[0] = "One";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Two";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Three";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Four";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Five";
dt.Rows.Add(dr);
DataGrid1.DataSource =
dt.DefaultView;
DataGrid1.DataBind();
}
}

protected void DataGrid1_ItemCreated(object s,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType ==
System.Web.UI.WebControls.ListItemType.Header)
{
System.Web.UI.WebControls.TextBox tbName =
e.Item.FindControl("tbName") as
System.Web.UI.WebControls.TextBox;
if(tbName != null)
tbName.Text = "Gotcha!";
}
}
}

Greetings
Martin
"Yan Wang" <yw*******@shaw.ca> wrote in message
news:FO9hc.175907$Pk3.74406@pd7tw1no...
Hi!

You are right. But still I can not solve the problem. I try to catch
"OnItemDataBound" event is only raised when IsPostBack is true.
Same as OnItemCreate event. So I still can not get the text which I typed
in. I also notice, I can not make tbName instantialize
at codebhind class.(I use "protected TextBox tbName;" in class, it is always NULL).
Is that because MS only want all stuff in datagrid to be shown to page only? Any idea how to get content of textbox in
HeaderTemplate but that content is what typed from user not from program? Or I have to go back as normal html input tag for
that textbox?

Thanks for your help!

Yan

"Martin Dechev" <de*******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
Hi, Yan Wang,

The condition

if (tbTemp.Text != null && tbTemp.Text.Length > 0)

is supposed to be false on the first request (when IsPostBack is false)
because the control is added like this:

<asp:TextBox Runat="server" ID="tbName" EnableViewState="True"/>

Try to set the Text property in order to make the condition if

(tbTemp.Text
!= null && tbTemp.Text.Length > 0) true.

Hope this helps
Martin

"Yan Wang" <yw*******@shaw.ca> wrote in message
news:RL3hc.186759$oR5.176815@pd7tw3no...
Hi!

Does anyone know how to get the text in textbox field which is in
HeaderTemplate of a DataGrid?
In the following code, I can not get text of "tbName". I typed something
in
that box. I can get
tbName control but the text is empty.

Thanks a lot!

Yan

==================== asp
=============================================== <asp:datagrid Autogeneratecolumns="false" id="dgList" runat="server"
DataKeyField="ID">
<Columns>
<asp:TemplateColumn>
<ItemStyle></ItemStyle>
<ItemTemplate>
<asp:LinkButton Runat="server" CommandName="OnNameClicked">
<%# DataBinder.Eval(Container.DataItem, "NAME") %>
</asp:LinkButton>
</ItemTemplate>
<HeaderTemplate>
<table>
<tr>
<td>
<asp:LinkButton Runat="server" ID="btName"
OnCommand="OnNameSortClicked"

CommandArgument="NAME">Name</asp:LinkButton> <asp:Label Runat="server" ID="lbNameSort"></asp:Label>
</td>
<tr>
<td>
<asp:TextBox Runat="server" ID="tbName"
EnableViewState="True"></asp:TextBox>
</td>
</tr>
</table>
</HeaderTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
========================= sever ======================================= public void OnItemDataBound(object sender, DataGridItemEventArgs e) {
if (e.Item.ItemType == ListItemType.Header) {
for (int i = 0; i < m_dgList.Columns.Count; ++i) {
Control aControl = null;
if (e.Item.Cells[i].HasControls()) {
aControl = e.Item.Cells[i].FindControl("tbName");
if (aControl != null) {
TextBox tbTemp = (TextBox)aControl; // I reach here
if (tbTemp.Text != null && tbTemp.Text.Length > 0) {
tbTemp.Text = "Got it!";
//never reach here!!!!
}
}
}
}
}
}




Nov 18 '05 #4
Hi! Martin:

Thanks a lot for your reply. From code here, I think you put "Gotcha" in
code. What I want
is that I want to get the content of that textbox. Say, I type in something
to that textbox from
browser. Then I click "One" (a link button in datagrid item). The page is
posted back to server.
Now, I want to get the content of TextBox in HeaderTemplate at this time.
But I find, I
can not get it. It always return me empty string.

Do you know how to solve it?

Thanks a lot!

Yan
"Martin Dechev" <de*******@hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi, Yan,

Maybe this code can help you because it is working for me:

Listing <test.aspx>:

<%@ Page language="C#" inherits="test_aspx" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
</head>
<body>
<form id="form1" method="post" runat="server">
<asp:datagrid id="DataGrid1" runat="server"
autogeneratecolumns="False" onitemcreated="DataGrid1_ItemCreated">
<columns>
<asp:templatecolumn>
<itemtemplate>
<asp:linkbutton runat="server" commandname="OnNameClicked" id="Linkbutton1"> <%# DataBinder.Eval(Container.DataItem, "column1") %>
</asp:linkbutton>
</itemtemplate>
<headertemplate>
<table>
<tr>
<td>
<asp:textbox runat="server" id="tbName"
enableviewstate="True"/>
</td>
</tr>
</table>
</headertemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
</form>
</body>
</html>

Listing <test_aspx.cs>:

using System;

public class test_aspx : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;

protected void Page_Load(object s, EventArgs e)
{
if(!IsPostBack)
{
System.Data.DataTable dt =
new System.Data.DataTable();
System.Data.DataRow dr;
dt.Columns.Add("column1", typeof(string));
dr = dt.NewRow();
dr[0] = "One";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Two";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Three";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Four";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Five";
dt.Rows.Add(dr);
DataGrid1.DataSource =
dt.DefaultView;
DataGrid1.DataBind();
}
}

protected void DataGrid1_ItemCreated(object s,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType ==
System.Web.UI.WebControls.ListItemType.Header)
{
System.Web.UI.WebControls.TextBox tbName =
e.Item.FindControl("tbName") as
System.Web.UI.WebControls.TextBox;
if(tbName != null)
tbName.Text = "Gotcha!";
}
}
}

Greetings
Martin
"Yan Wang" <yw*******@shaw.ca> wrote in message
news:FO9hc.175907$Pk3.74406@pd7tw1no...
Hi!

You are right. But still I can not solve the problem. I try to catch
"OnItemDataBound" event is only raised when IsPostBack is true.
Same as OnItemCreate event. So I still can not get the text which I typed
in. I also notice, I can not make tbName instantialize
at codebhind class.(I use "protected TextBox tbName;" in class, it is always
NULL).
Is that because MS only want all stuff in datagrid to be shown to page

only?
Any idea how to get content of textbox in
HeaderTemplate but that content is what typed from user not from

program? Or
I have to go back as normal html input tag for
that textbox?

Thanks for your help!

Yan

"Martin Dechev" <de*******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
Hi, Yan Wang,

The condition

if (tbTemp.Text != null && tbTemp.Text.Length > 0)

is supposed to be false on the first request (when IsPostBack is false) because the control is added like this:

<asp:TextBox Runat="server" ID="tbName" EnableViewState="True"/>

Try to set the Text property in order to make the condition if (tbTemp.Text
!= null && tbTemp.Text.Length > 0) true.

Hope this helps
Martin

"Yan Wang" <yw*******@shaw.ca> wrote in message
news:RL3hc.186759$oR5.176815@pd7tw3no...
> Hi!
>
> Does anyone know how to get the text in textbox field which is in
> HeaderTemplate of a DataGrid?
> In the following code, I can not get text of "tbName". I typed

something in
> that box. I can get
> tbName control but the text is empty.
>
> Thanks a lot!
>
> Yan
>
> ==================== asp =============================================== > <asp:datagrid Autogeneratecolumns="false" id="dgList" runat="server"
> DataKeyField="ID">
> <Columns>
> <asp:TemplateColumn>
> <ItemStyle></ItemStyle>
> <ItemTemplate>
> <asp:LinkButton Runat="server" CommandName="OnNameClicked">
> <%# DataBinder.Eval(Container.DataItem, "NAME") %>
> </asp:LinkButton>
> </ItemTemplate>
> <HeaderTemplate>
> <table>
> <tr>
> <td>
> <asp:LinkButton Runat="server" ID="btName"
> OnCommand="OnNameSortClicked"

CommandArgument="NAME">Name</asp:LinkButton>
> <asp:Label Runat="server" ID="lbNameSort"></asp:Label>
> </td>
> <tr>
> <td>
> <asp:TextBox Runat="server" ID="tbName"
> EnableViewState="True"></asp:TextBox>
> </td>
> </tr>
> </table>
> </HeaderTemplate>
> </asp:TemplateColumn>
> </Columns>
> </asp:datagrid>
> ========================= sever ======================================= > public void OnItemDataBound(object sender, DataGridItemEventArgs e) { > if (e.Item.ItemType == ListItemType.Header) {
> for (int i = 0; i < m_dgList.Columns.Count; ++i) {
> Control aControl = null;
> if (e.Item.Cells[i].HasControls()) {
> aControl = e.Item.Cells[i].FindControl("tbName");
> if (aControl != null) {
> TextBox tbTemp = (TextBox)aControl;
// I > reach here
> if (tbTemp.Text != null && tbTemp.Text.Length > 0) {
> tbTemp.Text = "Got it!";
> //never reach here!!!!
> }
> }
> }
> }
> }
> }
>
>


Nov 18 '05 #5
Hi, Yan,

The only place I could get reference to the textbox in the header was the
OnItemCreated event. The problem is that it happens after the call to the
event handler of the LinkButtons Click event. Apart from this, the viewstate
gets loaded after the OnItemCreated event. So, the only way is to append
info in the both event handlers and then do the processing in a third event
handler - after the viewstate has been loaded. I chose the OnPreRender event
of the datagrid for this.

Well, this seems to be a dirty solution... But it is working

listing <text.aspx>:

<%@ Page language="C#" inherits="test_aspx" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
</head>
<body>
<form id="form1" method="post" runat="server">
<asp:datagrid id="DataGrid1" runat="server"
autogeneratecolumns="False"
onitemcreated="DataGrid1_ItemCreated"
onprerender="DataGrid1_PreRender">
<columns>
<asp:templatecolumn>
<itemstyle></itemstyle>
<itemtemplate>
<asp:linkbutton runat="server" id="Linkbutton1"
oncommand="LinkButton_Command" commandname="OnNameClicked"
commandargument='<%# DataBinder.Eval(Container.DataItem,"column1")%>'>
<%# DataBinder.Eval(Container.DataItem, "column1") %>
</asp:linkbutton>
</itemtemplate>
<headertemplate>
<table>
<tr>
<td>
<asp:textbox runat="server" id="tbName"/>
</td>
</tr>
</table>
</headertemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
the posted value is:
<asp:literal id="Literal1" runat="server">n/a</asp:literal>
</form>
</body>
</html>

listing <test_aspx.cs>:

using System;

public class test_aspx : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;
protected System.Web.UI.WebControls.Literal Literal1;

System.Web.UI.WebControls.TextBox tb;
string _commandArg, _commandName;
bool _linkButtonClicked;

protected void Page_Load(object s, EventArgs e)
{
if(!IsPostBack)
{
System.Data.DataTable dt = new System.Data.DataTable();
System.Data.DataRow dr;
dt.Columns.Add("column1", typeof(string));
dr = dt.NewRow();
dr[0] = "One";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Two";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Three";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Four";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "Five";
dt.Rows.Add(dr);
DataGrid1.DataSource = dt.DefaultView;
DataGrid1.DataBind();
}
}

protected void LinkButton_Command(object s,
System.Web.UI.WebControls.CommandEventArgs e)
{
// Store the info in the private fields
// for the later processing:
_commandArg = (string)e.CommandArgument;
_commandName = e.CommandName;
_linkButtonClicked = true;
}

protected void DataGrid1_ItemCreated(object s,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType ==
System.Web.UI.WebControls.ListItemType.Header)
{
System.Web.UI.WebControls.TextBox tbName =
e.Item.FindControl("tbName") as
System.Web.UI.WebControls.TextBox;
if(tbName != null)
{
if(!IsPostBack)
tbName.Text = "Gotcha";
// Let's store the reference to this ghost:
tb = tbName;
}
}
}

protected void DataGrid1_PreRender(object s, EventArgs e)
{
if(_linkButtonClicked)
{
DoProcessing();
}
}

void DoProcessing()
{
// Do here the actual processing here

Literal1.Text = tb.Text;
}
}

Hope this helps
Martin
"Yan Wang" <yw*******@shaw.ca> wrote in message
news:eimhc.193934$oR5.2582@pd7tw3no...
Hi! Martin:

Thanks a lot for your reply. From code here, I think you put "Gotcha" in
code. What I want
is that I want to get the content of that textbox. Say, I type in something to that textbox from
browser. Then I click "One" (a link button in datagrid item). The page is
posted back to server.
Now, I want to get the content of TextBox in HeaderTemplate at this time.
But I find, I
can not get it. It always return me empty string.

Do you know how to solve it?

Thanks a lot!

Yan


Nov 18 '05 #6

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

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
4
by: Moojjoo | last post by:
Ok fellow C# developers: How do creat an instance of an object inside a dataset or datagrid. Example I need to have a placeholder inside a dataset. Any help would be great.
1
by: SamIAm | last post by:
Hi I have a DataGrid called dgTraders 1 of the columns is a template column and this column has a Dropdown box in its HeaderTemplate section. The Dropdown box is called selCities. How do I...
1
by: bill yeager | last post by:
I did some more debugging and found the following: 1) I placed the following code in the button event just to see if I could cycle thru the datagrid control collection: <code> Dim strhello As...
6
by: Yan Wang | last post by:
Hi! Does anyone know how to get the text in textbox field which is in HeaderTemplate of a DataGrid? In the following code, I can not get text of "tbName". I typed something in that box. I can...
1
by: David | last post by:
Hello. I have one question about DataList control: I have one DaaList control on my page in which I put some controls, for example I put two labels in header section and five labels in items...
2
by: Tarun Mistry | last post by:
Hi everyone, a simple problem I hope you guys can help me with. I have a repeater control, within this i would like to place another server control. I.e. <asp:Repeater id="Repeater1"...
4
by: Rob Meade | last post by:
Hi all, I played with my first bit of AJAX the other week and was pleasantly surprised that I achieved my goal..now I'd like to try something else.. Question... If I have an updatePanel,...
1
by: anjali.lourda | last post by:
Hi, We are trying to use the accordion control from ajaxcontroltoolkit by databinding to an sqldatasource. The accordion binds to the datasource perfectly. However, We are not able to access the...
1
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I have Mobile site that I'm building. My problem is that all of my pages are built as Mobile ASPX pages, but occasionally, I need to use controls which are not mobile. Most specifically, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
tracyyun
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...
0
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,...
0
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...

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.