Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# point of sale PinPopular
Vimalsoft(Pty) Ltd30-Jun-08 1:05
professionalVimalsoft(Pty) Ltd30-Jun-08 1:05 
AnswerRe: c# point of sale PinPopular
Harvey Saayman30-Jun-08 2:19
Harvey Saayman30-Jun-08 2:19 
RantRe: c# point of sale PinPopular
Harvey Saayman30-Jun-08 2:43
Harvey Saayman30-Jun-08 2:43 
QuestionHow can I open a hyperlink in a link click from my form in C#.net [modified] Pin
Anu Palavila30-Jun-08 0:47
Anu Palavila30-Jun-08 0:47 
AnswerRe: How can I open a hyperlink in a link click from my web form Pin
Vimalsoft(Pty) Ltd30-Jun-08 1:08
professionalVimalsoft(Pty) Ltd30-Jun-08 1:08 
AnswerRe: How can I open a hyperlink in a link click from my form in C#.net Pin
DaveyM6930-Jun-08 1:26
professionalDaveyM6930-Jun-08 1:26 
GeneralRe: How can I open a hyperlink in a link click from my form in C#.net Pin
Thomas Stockwell30-Jun-08 4:51
professionalThomas Stockwell30-Jun-08 4:51 
QuestionGridviw - my rowCommand does not run Pin
simsen30-Jun-08 0:42
simsen30-Jun-08 0:42 
Hi,

I have a gridview, with a rowcommand. When I try to debug I can see it dosn't call the rowCommand (DeleteImage) Please can anyone tell me, why it does not run that rowCommand?

my code:
<asp:GridView ID="grdImages" runat="server" AutoGenerateColumns="false" 
                            AutoGenerateEditButton="false" BorderColor="Transparent" 
                        CellPadding="2" GridLines="vertical" 
                            CellSpacing="0" DataKeyNames="filename"
                            ForeColor="Black"
                            ShowHeader="false" onsorting="grdImages_Sorting" 
                        onrowcommand="grdImages_RowCommand">
                        <RowStyle BorderStyle="Dotted" />
                        <Columns>            
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <img src='<%#Eval("imgImage")%>' alt="Image" width="50px" height="50px" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label ID="filename" runat="server" Text='<%#Eval("filename")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>                               
                                    <asp:Button CssClass="buttonsSmall" ID="btnDeleteImage" OnClientClick="return confirm('Billedet vil ikke længere kunne vises på livesitet. Er du sikker på, du vil slette billedet?');" Font-Size="8pt" runat="server" Text="Slet" CommandName="DeleteImage" CommandArgument='<%# Eval("filename")%>'  />
                                </ItemTemplate>
                                <HeaderStyle />
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle CssClass="rowcolor" />
                        <AlternatingRowStyle CssClass="alternatingrowcolor" />        
                    </asp:GridView>


protected void grdImages_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "DeleteImage")
        {
            int imagename = Convert.ToInt32(e.CommandArgument);
            string imagepath = Convert.ToString(Session["uploadpath"]);

            File.Move(imagepath + '/' + imagename, Constants.ImageRecycleBin.UploadPath + imagename);

            //Opdaterer gridview
            LoadImages(Convert.ToString(Session["uploadpath"]), "filename", "ASC");
        }
    }


Said with other words, when I hit the button in the gridview only the javascript event fires, not the RowCommand. I have tried to remove the javascript event with no success......
Kind regards,

simsen Smile | :)
AnswerRe: Gridviw - my rowCommand does not run Pin
simsen30-Jun-08 0:54
simsen30-Jun-08 0:54 
QuestionSystem.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
ozzox30-Jun-08 0:37
ozzox30-Jun-08 0:37 
AnswerRe: System.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
Daniel Grunwald30-Jun-08 2:24
Daniel Grunwald30-Jun-08 2:24 
GeneralRe: System.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
ozzox30-Jun-08 15:43
ozzox30-Jun-08 15:43 
AnswerRe: System.Diagnostics.Process used to start a c++ makefile ! Big issue ! Pin
leppie30-Jun-08 5:10
leppie30-Jun-08 5:10 
QuestionWeird data bindings issue Pin
Harvey Saayman30-Jun-08 0:22
Harvey Saayman30-Jun-08 0:22 
AnswerRe: Weird data bindings issue Pin
Vimalsoft(Pty) Ltd30-Jun-08 0:58
professionalVimalsoft(Pty) Ltd30-Jun-08 0:58 
AnswerRe: Weird data bindings issue Pin
Mbah Dhaim30-Jun-08 1:11
Mbah Dhaim30-Jun-08 1:11 
GeneralRe: Weird data bindings issue Pin
Harvey Saayman30-Jun-08 1:14
Harvey Saayman30-Jun-08 1:14 
QuestioncheckBox & ListView Pin
laziale30-Jun-08 0:20
laziale30-Jun-08 0:20 
AnswerRe: checkBox & ListView Pin
Vimalsoft(Pty) Ltd30-Jun-08 1:00
professionalVimalsoft(Pty) Ltd30-Jun-08 1:00 
GeneralRe: checkBox & ListView Pin
laziale30-Jun-08 1:19
laziale30-Jun-08 1:19 
QuestionDetermine incorrect String.Format format Pin
Stevo Z29-Jun-08 23:59
Stevo Z29-Jun-08 23:59 
AnswerRe: Determine incorrect String.Format format Pin
PIEBALDconsult30-Jun-08 5:10
mvePIEBALDconsult30-Jun-08 5:10 
QuestionSQL connection execute what? Pin
laziale29-Jun-08 23:13
laziale29-Jun-08 23:13 
AnswerRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:22
protectorChristian Graus29-Jun-08 23:22 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:28
laziale29-Jun-08 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.