Saturday, October 21, 2017

I want to move focus left right up down in html table

this is C# loops which create html table string from controller

for (int j=0; j< ds.Tables["tblMaster"].Rows.Count;j++)
            {
                html += " <tr>";
                //cell for customer name
                html += "<td class='bg-primary' onclick=CashMemo('"+ fromDate +"','"+ ToDate +"',"+ ds.Tables["tblMaster"].Rows[j]["intPoductId"].ToString() +","+ ds.Tables["tblMaster"].Rows[j]["intCustomerId"].ToString() + ")>" + ds.Tables["tblMaster"].Rows[j]["varName"].ToString()+"</td>";
                if (ds.Tables["tblMaster1"] != null)
                {
                    ds.Tables["tblMaster1"].Clear();
                }
                string query1 = "";                                                                                     //product id                                                  //custemr id                 
                query1 = " spLoadMonthlyDaysName '" + fromDate + "','" + ToDate + "' ," + ds.Tables["tblMaster"].Rows[j]["intPoductId"].ToString() + "," + ds.Tables["tblMaster"].Rows[j]["intCustomerId"].ToString();
                bll.loadData(ref ds, query1, "tblMaster1");
                //loop two for cells
                for (int d=0; d< ds.Tables["tblMaster1"].Rows.Count; d++)
                {
                    html += "<td style='padding: 0 !important;width:20px'>";
                    html += "<input class='form-control' type='text' onkeypress=getDeliveryInfo(" + ds.Tables["tblMaster"].Rows[j]["intCustomerId"].ToString()+","+ ds.Tables["tblMaster"].Rows[j]["intPoductId"].ToString() + ",'"+ ds.Tables["tblMaster1"].Rows[d]["CDate"].ToString()+"',"+ ds.Tables["tblMaster1"].Rows[d]["id"].ToString() + ");keypress(e); ng-model='txtflQty" + d + "' value='"+ds.Tables["tblMaster1"].Rows[d]["flQty"].ToString() + "' style='height: 41px; width:100%; padding: 0 !important;background-color : "+ ds.Tables["tblMaster1"].Rows[d]["CDateColor"].ToString()+"';/>";
                    html += "</td>";    
                }
                html += "</tr> ";
            }

enter image description here

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/10/21/i-want-to-move-focus-left-right-up-down-in-html-table/
via @lzomedia #developer #freelance #web #lzomedia.com

No comments:

Post a Comment