Hi I am using 2007 vol1 CLR2.0
We have some grids on our page now some of the grid require redirect to new page to show large detail pages and others do not require it since details for some grid is so small that we can show detail on same page though for UI consistency I want to make each first column as hyperlink for all the grids on the page but want to change behaviour of the column is there any way we can approch this
Just a quick follow-up -- I just came upon something that look close to what you need as well, you can check out the reply by Roger Bogh in this forum thread:
http://forums.infragistics.com/forums/t/770.aspx
Hello,
That is correct, WARP does not support redirect on server. However, your javascript codes should work.I do not know why they fail. You may try to debug/experiment (let say, with another temporary test page) by following:
My suggestion is to do the redirect on the client-side with javascript, e.g. "onclick = window.location.href = 'new location'". If this is not possible however, here is what you can do
1. Add asp:Button in WARP and on its Click event check if handler is hit by something likeMe.Button1.Text = Me.Button1.Text + "x"2. If it works, then try to add to your handler any line from list belowMe.WebAsyncRefreshPanel1.Controls.Add(New LiteralControl("<script type='text/javascript'>window.location='frmPSEmployee.aspx';</script>"))
Me.WebAsyncRefreshPanel1.Controls.AddAt(0, New LiteralControl("<script type='text/javascript'>window.location='frmPSEmployee.aspx';</script>"))
Infragistics.WebUI.Shared.CallBackManager.AddScriptBlock(Me, Nothing, "window.location='frmPSEmployee.aspx';")
Thanks for reply.
I did try this but linkbutton is not hitting code behind may be because Grid is in webAsyncRefreshPanel so This Approch may not work though I make it work temporarily by making first column as blue and underline and cell click javascript event will check if first column is clicked then it will call a button click event and which I hide on my UI
Hi,
You could use a Template Column and embed a LinkButton control in the column. Handle the Click event of the button, and based on the criteria of each grid, link to the appropriate target. If you need information from cells of the row to form the link you can get the cell that the link button is in using the following code:
CellItem cellItem = (CellItem)button.NamingContainer;
UltraGridCell cell = cellItem.Cell;
If you need just a button, not necessarily a link button, you can use the column type of button available off of a column.