Hello,
In one of the gridtemplate columns, i have a textbox with popupcontrolextender in which it will have a bigger textbox, so that the user can type in the comments easily.
My Scenario is, if i click on the textbox, a popup will be opened with big textbox in it. If i type something in, the content will be copied to the original textbox in the template column. I handled it through code behind.
If i click on the textbox in the template column again, then the text i entered is displaying in that popup.But the problem is, if i do a postback on the page, and then if i click on that textbox again,the text is not showing up on the popup even though it is displaying in the original textbox.
My Code:
So, how do i display the template column textbox text in the popup which will be fired when the textbox is clicked.
I don't see any onclick event for the textbox if i want to handle it through code behind or javascript.
I have this grid inside a update panel like this...
Please see my other post here, which has the complete code:
http://www.telerik.com/community/forums/aspnet-ajax/grid/problem-in-row-delete-clientside.aspx
Thanks
In one of the gridtemplate columns, i have a textbox with popupcontrolextender in which it will have a bigger textbox, so that the user can type in the comments easily.
My Scenario is, if i click on the textbox, a popup will be opened with big textbox in it. If i type something in, the content will be copied to the original textbox in the template column. I handled it through code behind.
If i click on the textbox in the template column again, then the text i entered is displaying in that popup.But the problem is, if i do a postback on the page, and then if i click on that textbox again,the text is not showing up on the popup even though it is displaying in the original textbox.
My Code:
<
telerik:GridTemplateColumn
HeaderText
=
"First IncSrc."
UniqueName
=
"MemFirstIncomeSource"
>
<
ItemTemplate
>
<
asp:TextBox
ID
=
"txtMemFirstIncSrc"
runat
=
"server"
ToolTip
=
"First Income Source"
Width
=
"80px"
>
</
asp:TextBox
>
<
asp:PopupControlExtender
ID
=
"FirstIncSrcPopEx"
runat
=
"server"
TargetControlID
=
"txtMemFirstIncSrc"
CacheDynamicResults
=
"true"
PopupControlID
=
"FirstIncSrcPnl"
Position
=
"Left"
/>
<
asp:Panel
ID
=
"FirstIncSrcPnl"
runat
=
"server"
CssClass
=
"PopupModalWindow"
Style
=
"display: none"
>
<
table
>
<
tr
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtFirstIncSrc"
runat
=
"server"
TextMode
=
"MultiLine"
AutoPostBack
=
"true"
OnTextChanged
=
"txtFirstIncSrc_TextChanged"
Width
=
"280px"
EmptyMessage
=
"Click Here"
>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
asp:Panel
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
protected
void
txtFirstIncSrc_TextChanged(
object
sender, EventArgs e)
{
RadTextBox txtFirstIncSrc = (RadTextBox)sender;
PopupControlExtender PopupControlExtender1 = (PopupControlExtender)txtFirstIncSrc.Parent.FindControl(
"FirstIncSrcPopEx"
);
PopupControlExtender1.Commit(txtFirstIncSrc.Text);
}
So, how do i display the template column textbox text in the popup which will be fired when the textbox is clicked.
I don't see any onclick event for the textbox if i want to handle it through code behind or javascript.
I have this grid inside a update panel like this...
<
asp:UpdatePanel
ID
=
"UpdatePanel2"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
Triggers
>
<
asp:AsyncPostBackTrigger
ControlID
=
"ButtonAdd"
/>
<
asp:AsyncPostBackTrigger
ControlID
=
"btnShow"
/>
<
asp:AsyncPostBackTrigger
ControlID
=
"btnHide"
/>
</
Triggers
>
<
ContentTemplate
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"False"
Height
=
"250px"
AllowAutomaticDeletes
=
"true"
CellSpacing
=
"0"
GridLines
=
"None"
ShowFooter
=
"True"
Skin
=
"Vista"
Width
=
"1610px"
onitemdatabound
=
"RadGrid1_ItemDataBound"
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
<
WebServiceSettings
>
<
ODataSettings
InitialContainerName
=
""
>
</
ODataSettings
>
</
WebServiceSettings
>
</
HeaderContextMenu
>
<
MasterTableView
AllowAutomaticDeletes
=
"True"
DataKeyNames
=
"Number"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
Visible
=
"True"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
Visible
=
"True"
>
</
ExpandCollapseColumn
>
<
Columns
>
Please see my other post here, which has the complete code:
http://www.telerik.com/community/forums/aspnet-ajax/grid/problem-in-row-delete-clientside.aspx
Thanks