Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Gridview Button problem

Gridview Button problem

Scheduled Pinned Locked Moved ASP.NET
sysadminhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RajpootRohan
    wrote on last edited by
    #1

    Hi to all, I am stucked in a problem. I have a gridview in which there are two button columns. On button click I want image to open in fax viewer. I tried like this. But the problem is that the foreach is going through all the rows. I want that if a user clicks on a certain button then it should open the corresponding image. Please assist me... <asp:GridView ID="GridView1" runat="server" BackColor="White" DataKeyNames="UniqueID" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" AutoGenerateColumns="False"> <RowStyle ForeColor="#000000" /> <FooterStyle BackColor="White" ForeColor="#000066" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> <Columns> <asp:TemplateField HeaderStyle-Width="50px" HeaderText="SrNo" InsertVisible="False" SortExpression="SrNo"> <ItemTemplate> <asp:Label ID="SrNoLabel" runat="server" Text='<%# Bind("SrNo") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="50px"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderStyle-Width="50px" HeaderText="UniqueID" InsertVisible="False" SortExpression="UniqueID"> <ItemTemplate> <asp:Label ID="UniqueIDLabel" runat="server" Text='<%# Bind("UniqueID") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="50px"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderStyle-Width="50px" HeaderText="BridgeNo" InsertVisible="False" SortExpression="BridgeNo"> <ItemTemplate> <asp:Label ID="BridgeNoLabel" runat="server" Text='<%# Bind("BridgeNo") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="50px"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Left" HeaderText="PlanNo" InsertVisible="False" SortExpression="PlanNo"> <ItemTemplate>

    S 1 Reply Last reply
    0
    • R RajpootRohan

      Hi to all, I am stucked in a problem. I have a gridview in which there are two button columns. On button click I want image to open in fax viewer. I tried like this. But the problem is that the foreach is going through all the rows. I want that if a user clicks on a certain button then it should open the corresponding image. Please assist me... <asp:GridView ID="GridView1" runat="server" BackColor="White" DataKeyNames="UniqueID" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" AutoGenerateColumns="False"> <RowStyle ForeColor="#000000" /> <FooterStyle BackColor="White" ForeColor="#000066" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> <Columns> <asp:TemplateField HeaderStyle-Width="50px" HeaderText="SrNo" InsertVisible="False" SortExpression="SrNo"> <ItemTemplate> <asp:Label ID="SrNoLabel" runat="server" Text='<%# Bind("SrNo") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="50px"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderStyle-Width="50px" HeaderText="UniqueID" InsertVisible="False" SortExpression="UniqueID"> <ItemTemplate> <asp:Label ID="UniqueIDLabel" runat="server" Text='<%# Bind("UniqueID") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="50px"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderStyle-Width="50px" HeaderText="BridgeNo" InsertVisible="False" SortExpression="BridgeNo"> <ItemTemplate> <asp:Label ID="BridgeNoLabel" runat="server" Text='<%# Bind("BridgeNo") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="50px"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Left" HeaderText="PlanNo" InsertVisible="False" SortExpression="PlanNo"> <ItemTemplate>

      S Offline
      S Offline
      sashidhar
      wrote on last edited by
      #2

      System.Diagnostics.Process.Start(final_text); will act as Start -->Run--> prompt I am Not Sure This Will Work Or Not But Try It

          Process.Start("UrPictureViewerExePathToInvoke" + imagePath) 
      

      in my system UrPictureViewerExePathToInvoke= rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen Convert the code in C# and Do it

      modified on Friday, September 4, 2009 8:30 AM

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups