Hello,
Does anyone know a way to set the postback url of a button in a grid button column. Right Now I have a column that has a button that makes visible an invisible dock where the user can do some work then when closed it returns to where they were. I have other buttons that postback to where this dock is on visiblity, but I can't figure out a good way to make the page scroll to that position on click. I do have some java script that makes it flash to the location but then it goes back to the top of the page. Anyone have any good ideas?
Matt
Does anyone know a way to set the postback url of a button in a grid button column. Right Now I have a column that has a button that makes visible an invisible dock where the user can do some work then when closed it returns to where they were. I have other buttons that postback to where this dock is on visiblity, but I can't figure out a good way to make the page scroll to that position on click. I do have some java script that makes it flash to the location but then it goes back to the top of the page. Anyone have any good ideas?
Matt
4 Answers, 1 is accepted
0
Accepted
Hello Matt,
I created simple demo for you. Please find it attached to this post.
Let us know if we can assist you further.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I created simple demo for you. Please find it attached to this post.
Let us know if we can assist you further.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Matt
Top achievements
Rank 1
answered on 28 Jan 2009, 05:44 PM
We actually decided to go another way, but thanks for your help!!!
Matt
Matt
0

M S
Top achievements
Rank 1
answered on 14 Jun 2010, 02:49 PM
With regards to the above , can I have crosspage postback to a different page with the datakeyvalue passed to the other page. My scenario will be one page with grid and upon double click or itemcommand click to take me to a different page where I show more information about the row selected.
Presently I have a hidden text box and upon mouse over store the datakeyvalue in this textbox, which is now hidden. Upon click of a grid commandbutton
Presently I have a hidden text box and upon mouse over store the datakeyvalue in this textbox, which is now hidden. Upon click of a grid commandbutton
<
telerik:GridTemplateColumn UniqueName="TemplateColumn">
<ItemTemplate>
<asp:Button id="cmdTransfer" runat="server" Text="Transfer" PostBackUrl="delthis1.aspx"/>
</ItemTemplate>
</telerik:GridTemplateColumn>
i move to detailview.aspx where the hidden field wil be available.
0
Hello,
You can use Server.Transfer to make a cross-page postback on row click. Please test the attached sample project and let me know whether the demonstrated approach is suitable for you.
Original page:
Target page:
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can use Server.Transfer to make a cross-page postback on row click. Please test the attached sample project and let me know whether the demonstrated approach is suitable for you.
Original page:
protected
void
RadGrid1_ItemCommand(
object
source, GridCommandEventArgs e)
{
if
(e.CommandName ==
"RowClick"
)
Server.Transfer(
"~/Default2.aspx"
,
true
);
}
Target page:
protected
void
Page_Init(
object
sender, EventArgs e)
{
if
(Page.PreviousPage !=
null
)
{
RadGrid radGrid = Page.PreviousPage.FindControl(
"RadGrid1"
)
as
RadGrid;
string
catID = (radGrid.SelectedItems[0]
as
GridDataItem).GetDataKeyValue(
"CategoryID"
).ToString();
SqlDataSource1.SelectParameters[
"CategoryID"
].DefaultValue = catID;
}
}
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.