I have a grid . I want only when click in edit link buton the info of Item will show on textboxName. But when I click no thing happen.
I try to add <UpdatedControls> </UpdatedControls> then when i short grid the textbox also refress.
I also try add RadAjaxPanel1.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel1.ClientID));
when showdata but it does not work
Code Behind:
Thanks
I try to add <UpdatedControls> </UpdatedControls> then when i short grid the textbox also refress.
I also try add RadAjaxPanel1.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel1.ClientID));
when showdata but it does not work
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadFormDecorator
ID
=
"QsfFromDecorator"
runat
=
"server"
DecoratedControls
=
"All"
EnableRoundedCorners
=
"false"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
</
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadTextBox
ID
=
"txtName"
runat
=
"server"
>
</
telerik:RadTextBox
>
.....
</
telerik:RadAjaxPanel
>
<
telerik:RadGrid
AutoGenerateColumns
=
"False"
ID
=
"RadGrid1"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
PageSize
=
"15"
ShowFooter
=
"True"
AllowPaging
=
"True"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
CellSpacing
=
"0"
GridLines
=
"None"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
OnItemCommand
=
"RadGrid1_ItemCommand"
>
<
GroupingSettings
CaseSensitive
=
"false"
></
GroupingSettings
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
MasterTableView
AutoGenerateColumns
=
"false"
AllowFilteringByColumn
=
"True"
ShowFooter
=
"True"
DataKeyNames
=
"Id"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridButtonColumn
ButtonType
=
"LinkButton"
CommandName
=
"_edit"
CommandArgument
=
"Id"
Text
=
"Edit"
UniqueName
=
"Edit"
>
</
telerik:GridButtonColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
UniqueName
=
"EditCommandColumn1"
FilterControlAltText
=
"Filter EditCommandColumn1 column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
Code Behind:
protected
void
RadGrid1_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName ==
"_edit"
)
{
int
id = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"Id"
]);
LoadItem(id); // Show data to textbox
}
}
Thanks