Results 1 to 11 of 11

Thread: how to use gridview like render = 'inline' property of updatepanel..?

  1. #1

    Thread Starter
    Addicted Member mynameishide's Avatar
    Join Date
    Apr 2010
    Posts
    136

    Question 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

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  3. #3

    Thread Starter
    Addicted Member mynameishide's Avatar
    Join Date
    Apr 2010
    Posts
    136

    Re: how to use gridview like render = 'inline' property of updatepanel..?

    oppppsss thanks

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  5. #5

    Thread Starter
    Addicted Member mynameishide's Avatar
    Join Date
    Apr 2010
    Posts
    136

    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..

  6. #6

    Thread Starter
    Addicted Member mynameishide's Avatar
    Join Date
    Apr 2010
    Posts
    136

    Re: how to use gridview like render = 'inline' property of updatepanel..?

    anyone ?

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  8. #8

    Thread Starter
    Addicted Member mynameishide's Avatar
    Join Date
    Apr 2010
    Posts
    136

    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.

  9. #9
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  10. #10

    Thread Starter
    Addicted Member mynameishide's Avatar
    Join Date
    Apr 2010
    Posts
    136

    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 ??

  11. #11
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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
  •  



Click Here to Expand Forum to Full Width