Click here to Skip to main content
15,894,271 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: asp.net question Pin
Guffa9-Aug-07 0:35
Guffa9-Aug-07 0:35 
AnswerRe: asp.net question Pin
Christian Graus9-Aug-07 0:25
protectorChristian Graus9-Aug-07 0:25 
Questionread html controls in code behind file Pin
deepalititi8-Aug-07 23:54
deepalititi8-Aug-07 23:54 
AnswerRe: read html controls in code behind file Pin
Christian Graus9-Aug-07 0:23
protectorChristian Graus9-Aug-07 0:23 
AnswerRe: read html controls in code behind file Pin
Imran Khan Pathan9-Aug-07 0:23
Imran Khan Pathan9-Aug-07 0:23 
GeneralRe: read html controls in code behind file Pin
VanithaVasu9-Aug-07 22:32
VanithaVasu9-Aug-07 22:32 
Question"File has not been pre-compiled" error on page Pin
deep78-Aug-07 23:48
deep78-Aug-07 23:48 
QuestionHow to access a EditCommandColumn in a DataGrid? Pin
thomasa8-Aug-07 23:19
thomasa8-Aug-07 23:19 
How can I access the EditCommandColumn in a DataGrid on ItemCreated?

My datagrid is like:
<br />
asp:datagrid id="myDataGrid" runat="server" Width="100%" BorderWidth="0px" CellPadding="0"<br />
	AutoGenerateColumns="False" AllowSorting="True"<br />
										AllowCustomPaging="True" GridLines="Horizontal" ShowFooter="True" CssClass="grid"><br />
<br />
										Columns><br />
											asp:EditCommandColumn ButtonType="LinkButton"><br />
												<HeaderStyle Width="50px"></HeaderStyle><br />
											/asp:EditCommandColumn><br />
/Columns><br />
/asp:datagrid><br />


What I'm looking for looks something like this:
<br />
 private void myDataGrid_ItemCreated(object sender, DataGridItemEventArgs e)<br />
        {<br />
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) <br />
            {<br />
                EditCommandColumn myEditCommandColumn = (EditCommandColumn)e.Item.Controls[0];<br />
myEditCommandColumn.UpdateText = "<IMG src='" + My.Themes.ImgPath + "update.gif' border='0' alt='Update'>";<br />
myEditCommandColumn.CancelText = "<IMG src='" + My.Themes.ImgPath + "cancel.gif' border='0' alt='Cancel'>";<br />
               }<br />
}<br />


As you see I want to add Images on the different text commands,
but I have problems getting the "EditCommandColumn myEditCommandColumn = (EditCommandColumn)e.Item.Controls[0];".


Thanks
Thomas
Questionupload video clip Pin
Milind Panchal8-Aug-07 23:09
Milind Panchal8-Aug-07 23:09 
AnswerRe: upload video clip Pin
Talal Sultan8-Aug-07 23:46
Talal Sultan8-Aug-07 23:46 
Questionnavigater url problem Pin
Sonia Gupta8-Aug-07 23:07
Sonia Gupta8-Aug-07 23:07 
AnswerRe: navigater url problem Pin
Imran Khan Pathan8-Aug-07 23:34
Imran Khan Pathan8-Aug-07 23:34 
GeneralRe: navigater url problem Pin
Sonia Gupta8-Aug-07 23:43
Sonia Gupta8-Aug-07 23:43 
AnswerRe: navigater url problem Pin
N a v a n e e t h9-Aug-07 0:40
N a v a n e e t h9-Aug-07 0:40 
QuestionGrid View Paging ? Pin
sanjay_tutu8-Aug-07 22:53
sanjay_tutu8-Aug-07 22:53 
AnswerRe: Grid View Paging ? Pin
VanithaVasu9-Aug-07 22:59
VanithaVasu9-Aug-07 22:59 
Questionproblem with Gridview header checkbox and checkbox column Pin
indiaone8-Aug-07 22:52
indiaone8-Aug-07 22:52 
AnswerRe: problem with Gridview header checkbox and checkbox column Pin
VanithaVasu9-Aug-07 23:44
VanithaVasu9-Aug-07 23:44 
QuestionVisual Studio 2008 Beta 2 Pin
Brendan Vogt8-Aug-07 22:35
Brendan Vogt8-Aug-07 22:35 
AnswerRe: Visual Studio 2008 Beta 2 Pin
Sherin Iranimose8-Aug-07 23:58
Sherin Iranimose8-Aug-07 23:58 
QuestionFocus on desired button..? Pin
fmlove8-Aug-07 22:14
fmlove8-Aug-07 22:14 
AnswerRe: Focus on desired button..? Pin
N a v a n e e t h8-Aug-07 22:49
N a v a n e e t h8-Aug-07 22:49 
Questionasp.net and vista home basic Pin
S A R I T H8-Aug-07 22:13
S A R I T H8-Aug-07 22:13 
Questionconvert HTML content of .aspx page to PDF file Pin
Imran Khan Pathan8-Aug-07 21:57
Imran Khan Pathan8-Aug-07 21:57 
AnswerRe: convert HTML content of .aspx page to PDF file Pin
N a v a n e e t h8-Aug-07 22:50
N a v a n e e t h8-Aug-07 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.