in WebGrid Client-side binding mode,how to migrate  the codes to the appropriate client-side events.

protected void wg_test_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)

        {
            if (e.Row.Table.DataMember == "TMyTable")
            {
                if (e.Row.Type == RowType.Record)
                {
                    DataRowView objRow = (DataRowView)e.Row.DataRow;
                    // obtain the cells collection of the current row 
                    WebGridCellCollection cells = e.Row.Cells;

                    WebGridCellTemplateContainer detail_cell = cells.GetNamedItem("f_id").GetTemplateContainer();
                    LinkButton lb_detail = (LinkButton)detail_cell.FindControl("lb_detail");
                    lb_detail.Attributes["OnClick"] = "return showToolTip(this, '" + objRow["f_id"].ToString() + "')";

                    e.Row.Style.Font.Bold = true;

                    if (objRow["f_step"].ToString() == "2")                 
                        e.Row.Style.ForeColor = System.Drawing.Color.Green;
                    else if (objRow["f_step"].ToString() == "1")            
                        e.Row.Style.ForeColor = System.Drawing.Color.Blue;
                    else if (objRow["f_step"].ToString() == "-2")          
                        e.Row.Style.ForeColor = System.Drawing.Color.Black;
                    else if (objRow["f_step"].ToString() == "0")                                   
                      e.Row.Style.ForeColor = System.Drawing.Color.CadetBlue;
                }
            }
        }

 

        function InitializeRow(id, row) {
            if (row.Type == "Record") {

	    // DataRowView objRow = (DataRowView)e.Row.DataRow; 
            // WebGridCellCollection cells = e.Row.Cells;

	    // WebGridCellTemplateContainer detail_cell = cells.GetNamedItem("f_id").GetTemplateContainer();
            // LinkButton lb_detail = (LinkButton)detail_cell.FindControl("lb_detail");
            // lb_detail.Attributes["OnClick"] = "return showToolTip(this, '" + objRow["f_id"].ToString() + "')";

	    //e.Row.Style.Font.Bold = true;

            //if (objRow["f_step"].ToString() == "2")                 
            //    e.Row.Style.ForeColor = System.Drawing.Color.Green;
            //else if (objRow["f_step"].ToString() == "1")            
            //    e.Row.Style.ForeColor = System.Drawing.Color.Blue;
            //else if (objRow["f_step"].ToString() == "-2")          
            //    e.Row.Style.ForeColor = System.Drawing.Color.Black;
            //else if (objRow["f_step"].ToString() == "0")           
            //    e.Row.Style.ForeColor = System.Drawing.Color.CadetBlue;

            }
        }

 

thanks