Click here to Skip to main content
15,891,919 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionASP .NET Master Page + design mode problem Pin
Steve5730-Sep-07 0:58
Steve5730-Sep-07 0:58 
Questionvalidator control error Pin
IamAmit30-Sep-07 0:15
IamAmit30-Sep-07 0:15 
AnswerRe: validator control error Pin
John-ph30-Sep-07 3:41
John-ph30-Sep-07 3:41 
GeneralRe: validator control error Pin
IamAmit1-Oct-07 21:03
IamAmit1-Oct-07 21:03 
QuestionHTML Table Error Pin
Kurian_Kurian29-Sep-07 16:47
Kurian_Kurian29-Sep-07 16:47 
AnswerRe: HTML Table Error Pin
Scott Dorman29-Sep-07 18:52
professionalScott Dorman29-Sep-07 18:52 
QuestionDropdownlist in Grid View Pin
banker_kiran29-Sep-07 3:16
banker_kiran29-Sep-07 3:16 
AnswerRe: Dropdownlist in Grid View Pin
NetBot29-Sep-07 7:49
NetBot29-Sep-07 7:49 
I have one gridview control with two hidden fields and one dropdownlist.
AutoPostback property of dropdownlist is true.


You can use Item template for inserting a dropdownlist in the datagrid .
<Columns>
<asp:TemplateColumn HeaderText="Action">
<ItemTemplate>
<asp:DropDownList id="DDAction" runat="server" Visible="False" OnSelectedIndexChanged="DropDown_SelectedIndexChanged"
AutoPostBack="True"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>


Now , when selected_index_changed event of dropdownlist fire, that time i want to
know that at which row index dropdownlist is.



Now in the code behind write the following code.

protected void DropDown_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList list = (DropDownList)sender;
if(list.SelectedItem.Text==".......";
.....
//To get the corresponding row

TableCell cell = list.Parent as TableCell;// getting the parent cell of dropdown
DataGridItem item = cell.Parent as DataGridItem;//getting the parent of tablecell ie the row
string p_key=item.Cells[2].Text.Trim();//getting the column values of the row
........

Tickle your brain and the ideas are out
QuestionImage dose not displayed after downloaded from server Pin
rahul.net1129-Sep-07 2:53
rahul.net1129-Sep-07 2:53 
AnswerRe: Image dose not displayed after downloaded from server Pin
shenen00729-Sep-07 19:05
shenen00729-Sep-07 19:05 
QuestionStored Procedure Pin
Sonia Gupta29-Sep-07 2:39
Sonia Gupta29-Sep-07 2:39 
AnswerRe: Stored Procedure Pin
Christian Graus29-Sep-07 2:47
protectorChristian Graus29-Sep-07 2:47 
GeneralRe: Stored Procedure Pin
Sonia Gupta29-Sep-07 2:48
Sonia Gupta29-Sep-07 2:48 
GeneralRe: Stored Procedure Pin
Christian Graus29-Sep-07 2:52
protectorChristian Graus29-Sep-07 2:52 
Questiontwo drop down list Pin
subbu.sk29-Sep-07 2:01
subbu.sk29-Sep-07 2:01 
AnswerRe: two drop down list Pin
Christian Graus29-Sep-07 2:49
protectorChristian Graus29-Sep-07 2:49 
QuestionRegular Expression Pin
Kasi Viswanathan29-Sep-07 1:59
Kasi Viswanathan29-Sep-07 1:59 
AnswerRe: Regular Expression Pin
Christian Graus29-Sep-07 2:51
protectorChristian Graus29-Sep-07 2:51 
GeneralRe: Regular Expression Pin
Kasi Viswanathan29-Sep-07 3:06
Kasi Viswanathan29-Sep-07 3:06 
QuestionHow to Capture image Pin
arvind2899029-Sep-07 0:56
arvind2899029-Sep-07 0:56 
AnswerRe: How to Capture image Pin
Christian Graus29-Sep-07 1:03
protectorChristian Graus29-Sep-07 1:03 
QuestionHow to create dynamic column........ Pin
V.K.Singh29-Sep-07 0:24
V.K.Singh29-Sep-07 0:24 
AnswerRe: How to create dynamic column........ Pin
ShruthiLavan29-Sep-07 2:09
ShruthiLavan29-Sep-07 2:09 
Questiondropdownlist population Pin
Sonia Gupta28-Sep-07 23:25
Sonia Gupta28-Sep-07 23:25 
AnswerRe: dropdownlist population Pin
Christian Graus29-Sep-07 0:20
protectorChristian Graus29-Sep-07 0:20 

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.