This is a migrated thread and some comments may be shown as answers.

how to create link that will display RadGrid2

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TippCityTom
Top achievements
Rank 1
TippCityTom asked on 13 Aug 2009, 03:19 PM
I have two seperate RadGrids, I want the user to click on item in RadGrid1
+ if post count is zero then will popup via link a radwindow to add, this works
+ if post count is greater than zero then have a link that will simply pass the TopicID to RadGrid2 which will then display all posts
for that topic in seperate grid.  Would be  nice to have RadGrid2 visible = false UNTIL user clicks on this link

<

 

telerik:GridTemplateColumn UniqueName="Item" HeaderText="Item" ReadOnly="true" SortExpression="ITEM">

 

 

<ItemTemplate>

 

<%

# setPosts(Convert.ToInt32(Eval("Posts")))%>   -- this code sets a variabe in code behind so can be determined in next line

 

 

<%

if (Posts > 0)

 

{ %>

 

-- this is where I need the help
<
a href="#" runat="server" onserverclick='<%# withPosts(Convert.ToInt32(Eval("ID"))) %>'><%# DataBinder.Eval(Container.DataItem, "Item")%> (<%# DataBinder.Eval(Container.DataItem, "Posts")%>)

 

 

</a>

 

<%} %>

<%

else

 

{ %>

 

<a href="#" onclick="openAddTopicWindow('<%# DataBinder.Eval(Container.DataItem, "ID") %>'); return false;"><%# DataBinder.Eval(Container.DataItem, "Item")%> (<%# DataBinder.Eval(Container.DataItem, "Posts")%>)

 

 

</a>

 

<%} %>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 18 Aug 2009, 08:53 PM
Hello Thomas,

We would need some more information about your scenario. Please send us a simplified sample project that we can debug locally. You can exclude any code that is not connected to the needed functionality.

Looking forward to your reply.

Best regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
TippCityTom
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or