Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6379569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:09:19+00:00 2026-05-25T02:09:19+00:00

we are just started with Sigma Grid ,and it is awesome in its functionality

  • 0

we are just started with Sigma Grid ,and it is awesome in its functionality when we compared to other Grids.

But i encountered some problem with Sigma Grid ,or may be with javascript.
I dont know whether the problem is with Grid or with my code.

I have a table with 3 fields namely MailID,MailName,MailData.

MailID is int ,MailName and MailData contains HTML content and it save as string in database.

When i load the Grid,i have some problems.

Problem 1 :


As i said above the Maildata contain html content,the following image is just a example with <*b> ,u can see that the HTML is automatically rendering on the grid itself ,i need the exact string.

please check the following image.

Problem 2 :


as u can see i have links on the grid,for edit,send,delete but on one filed its damaged.[check the image below ]

the code i used to render links is following .

{id: 'mailid' ,  header: "Action", width :120 , resizable : false, sortable : false , printable : false ,
        renderer : function(value ,record,columnObj,grid,colNo,rowNo){
                var no= record[columnObj.fieldIndex];
                var cod =  (record['maildata']);
                return '<a href=\"#\" class=\"myli\" onClick="showalert('+no+');">Edit</a> | <a href=\"#\" onClick=\"alert('+cod+')\";>Send</a> | <a href=\"#\">Delete</a>';

http://i52.tinypic.com/f02c01.png

Problem 3 :


The third value of MailData is 5 and it is integer ,when i alert the value its shows it correctly.
check the following image.
http://i51.tinypic.com/2uqivyv.png

But when i alert the second value of maildata it giving error ,the second value of MailData is “hai newuser” ,it showing the following error on firebug.

missing ) after argument list
 alert(hai newuser)

check the image below.

http://i54.tinypic.com/2dc7h8k.png

But when i alert 9th value of MailData it run correctly ,the content is <b>poy</b> ,this one is also save as string,but the grid automatically BOLD [which i dnt like].Check the image below.
http://i53.tinypic.com/10fceb4.png

also there are some others the 7the value contain ;”.: etc ,also /b ,when i alert the data it showing the following error,

unexpected end of XML source
 alert(<b>jjfdslkdjflsdnfsldfnf

dsOptions and ColOptions are following .

var dsOption= {

    fields :[
        {name : 'mailid'  },
        {name : 'mailname',type:"text"  },
        {name : 'maildata',type:"text"  }






    ],

    recordType : 'object',


}


    function my_renderer(value ,record,columnObj,grid,colNo,rowNo)
    {
        var no= record[columnObj.fieldIndex];
        return "<img src=\"./images/flag_" + no.toLowerCase() + ".gif\">";
        }
        function showalert(no)
        {
        $(document).ready(function()
        {



        $.post("http://localhost/power/index.php/power/give",{ name: no}, function(data)
            {
            //alert("Data Loaded: " + data);
            $("#editor").show("fast");
            $( '#txtar' ).ckeditor();
            $('#txtar' ).val( data.maildata );
            //$("#editor").html(data);
            },"json"
         );

        });
        }



var colsOption = [
     {id: 'mailid' , header: "Mail ID" , width :60},
     {id: 'mailname' , header: "Mail Name" , width :160 ,type:"text"},
       {id: 'maildata' , header: "Mail Data" , width :190,type:"text" },
        {header: "Group" , width :70,
     editor : { type :"select" ,options : {'php':'php','asp':'asp'} 
     ,defaultText : 'php' }  },


       {id: 'mailid' ,  header: "Action", width :120 , resizable : false, sortable : false , printable : false ,
        renderer : function(value ,record,columnObj,grid,colNo,rowNo){
                var no= record[columnObj.fieldIndex];
                var cod =  (record['maildata']);
                return '<a href=\"#\" class=\"myli\" onClick="showalert('+no+');">Edit</a> | <a href=\"#\" onClick=\"alert('+cod+')\";>Send</a> | <a href=\"#\">Delete</a>';
            }  } 
];

I am littlebit new in Javascript and Sigmagrid,i think that i am doing something worst with codes,pls help me to success.

Thank you.

Note : i posted the same Question on Sigma Grid Forum too,i think that it is not a problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:09:19+00:00Added an answer on May 25, 2026 at 2:09 am

    Problem 2

    The string cod contains a >

    Problem 3

    The string hai newuser needs to be contained in " or ' or it is considered a variable name

    Basically you have to decide — are you going to validate the html or not. If you don’t validate the HTML then html errors in the data will show as errors on your page. You could also HTML escape the html so you will see the HTML codes — this is probably the best plan.

    Other sites use (like this one) use markdown — this is easier to validate — then they generate the actual HTML before display.

    In addition you are having problems with the alert. Alert displays strings not HTML so you will see what you are seeing — different results than expected depending on the HTML.


    I would take a step back and ask yourself — what is the type of the data, how am I going to display it. How am I going to validate that if it is HTML it is valid.

    There are the problems you need to address — your examples all stem from this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started doing some code porting from .Net CF to Blackberry JDE 4.6.1. But
Just started using Blueprint CSS and now playing with the grids but have a
Just started learning c++ today and im pretty boggled. its an amazing language but
Just started my first MVC 2.0 .net application. And I set up some default
Just started working with .NET and MVC(1). I'm having a problem wherein in my
Just started my first WCF rest project and would like some help on what
Just started learning Groovy, got the PragProg book Programming Groovy and had a problem
Just started working with android and ran into a small problem. I am have
Just started with JavaCC. But I have a strange behaviour with it. I want
Just started a tutorial in SQL for beginners. I'm doing some exercises now and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.