|
-
May 24th, 2013, 06:41 AM
#1
Thread Starter
Addicted Member
how to use gridview like render = 'inline' property of updatepanel..?
i use gridview in listview and use listview.GroupItemCount ="3"
i see that when i not use gridvew then listview proper show item in 3 column
but when i use gridview then listview not show data in 3 column..
my code is
Code:
<asp:ListView ID="lstviewtest" runat="server" GroupItemCount ="3">
<LayoutTemplate>
<asp:Placeholder id="groupPlaceholder" runat="server" />
</LayoutTemplate>
<GroupTemplate>
<div>
<asp:Placeholder id="itemPlaceholder" runat="server" />
</div>
</GroupTemplate>
<ItemTemplate>
<asp:Literal ID="ltrtest" runat="server" Text='<%# eval("name") %>' ></asp:Literal>
<asp:GridView ID="grd1" runat="server" AutoGenerateColumns="true" ></asp:GridView>
</ItemTemplate>
</asp:ListView>
Last edited by gep13; May 24th, 2013 at 07:51 AM.
Reason: Added code tags
-
May 24th, 2013, 07:51 AM
#2
Re: how to use gridview like render = 'inline' property of updatepanel..?
Hello,
When you are posting code into the forum, can you please remember to surround it in [code][/code] or [highlight][/highlight] tags? It makes it a lot easier to read. I have done this for you in your above post.
Gary
-
May 24th, 2013, 07:52 AM
#3
Thread Starter
Addicted Member
Re: how to use gridview like render = 'inline' property of updatepanel..?
-
May 24th, 2013, 07:59 AM
#4
Re: how to use gridview like render = 'inline' property of updatepanel..?
With regard to your question, I suspect that your Literal is getting "covered" by the GridView. If you check the view source for the rendered page, I suspect that it is there.
If you want a GridView within the ListView, I would suggest that you add the Literal to the ItemTemplate for the GridView.
Gary
-
May 25th, 2013, 12:48 AM
#5
Thread Starter
Addicted Member
Re: how to use gridview like render = 'inline' property of updatepanel..?
i hide the literal but still problem not solve.
also if i replace listview with datalist then code run property with save gridview and literal..
-
May 25th, 2013, 04:57 AM
#6
Thread Starter
Addicted Member
Re: how to use gridview like render = 'inline' property of updatepanel..?
-
May 26th, 2013, 01:39 PM
#7
Re: how to use gridview like render = 'inline' property of updatepanel..?
Hello,
Are you able to provide a complete sample application that is showing the problem that you are seeing? If you can upload it here, I will take a look.
Thanks
Gary
-
May 29th, 2013, 02:04 AM
#8
Thread Starter
Addicted Member
Re: how to use gridview like render = 'inline' property of updatepanel..?
hello,
i already pasted sample code in which if you comment gridview control then it run properly but if you uncomment gridview listview not group the item template..
also in above code u can replace the literal control with any other control like label, textbox.
-
May 29th, 2013, 02:12 AM
#9
Re: how to use gridview like render = 'inline' property of updatepanel..?
Hey,
In order to "test" your code, I would need to mock up a DataSource, fill it with data, etc. To make helping you as easy as possible, it would be easier (for me at least) for you to provide a complete "non working" sample. Then at least we have a base that we can both work from in order to figure out what the issue is that you are having.
Gary
-
May 29th, 2013, 03:49 AM
#10
Thread Starter
Addicted Member
Re: how to use gridview like render = 'inline' property of updatepanel..?
actually my code is distributed in different layer (BLL,DLL,etc).. so it take so much time to understand every aspect of real program.
so what i do ??
-
May 29th, 2013, 06:40 AM
#11
Re: how to use gridview like render = 'inline' property of updatepanel..?
I wasn't asking for our entire application. Rather, a stripped down version, that just has a hard coded datasource, with a few items in it.
The reason that I am suggesting this, as I find that taking a step back from the big application, and just focusing on one particular aspect of it, really helps to figure out what is going on. That way, you aren't worried about what is going on in your BLL, or your DAL, you are just focusing on one thing, in this case the usage of the GridView. This type of application is what I would have to create in order to test out what it going on above. I could do that, but that would give no benefit to me, only you. Where as if you create it, you might actually find the solution yourself. If you don't, post the sample application as is, and I will take a look.
Make sense?
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|