Posts

Add delimiters to text in inputs (J-Query)

function AddDelimiter(input, textbox, location, delimiter) {     //Iterate until all the delimiters are placed in the textbox     for (var delimCount = 0; delimCount <= location.length; delimCount++) {         for (var inputCharCount = 0; inputCharCount <= input.length; inputCharCount++) {             //Check for the actual position of the delimiter             if (inputCharCount == location[delimCount]) {                 //Confirm that the delimiter is not already present in that position                 if (input.substring(inputCharCount, inputCharCount + 1) != delimiter) {                     input = input.substring(0, inputCharCount) + delimiter + input.substring(inputCharCount, input.length);             ...

Change GridView row color based on condition in C# (GridView.RowDataBound Event)

 protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)     {         string value = "";         string value2 = "";         double cval;         double sval;         double color;         double round;         double reversal;               value = e.Row.Cells[4].Text.ToString().Trim();         value2 = e.Row.Cells[3].Text.ToString().Trim();         if (value != "&nbsp;" && value != "" )         {             if(value == "0" && value2 != "0" )             {                 e.Row.Cells[1].Style.Add("background-color", "GREEN");                 e...