Forum
18:04
29/08/2014
  Hi,
i have about 3 000 data
when i bind that data with grid i give some column a style according to item type
in some column i give icon.....Â
Â
but it take too timesÂ
what should i do?are there any solution that bind grid without json format?Â
instead of using that format
 Data += "SipEditButon: '<img src=\"/Images/icon20/edit-ico-20.png\"  onclick=\"async(function () {getOrderPopUp(\\\'" + item.SiparisID + "\\\',380);  });\" />', ";Â
Â
i want to use html img control direct without json
what should i doÂ
in below there is my code...after i get that data processing json set take 60 seconds for 3 000 record
only this code without sql...takes 60 secondsÂ
Â
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
var myData = [
@{
string Data = "";
foreach (var item in query)
{
Data += "{";
Data += "OpmsSipListDurum:'', ";
//if (item.HareketTipID == 1 && (item.IsTipID == 5 || item.IsTipID == 18))
//{
// Data += "OpmsSipListDurum:'', ";
//}
//else
//{
// if (item.OpmsSipListDurum == true)
// {
// Data += "OpmsSipListDurum:'<div class=\"css_green_circle\"></div>', ";
// }
// else
// {
// Data += "OpmsSipListDurum:'<div class=\"css_red_circle\"></div>', ";
// }
//}
Data += "OpmsCloseDurum:'', ";
//if (item.HareketTipID == 1 && (item.IsTipID == 5 || item.IsTipID == 18))
//{
// Data += "OpmsCloseDurum:'', ";
//}
//else
//{
// if (item.OpmsCloseDurum == true)
// {
// Data += "OpmsCloseDurum:'<div class=\"css_green_circle\"></div>', ";
// }
// else
// {
// Data += "OpmsCloseDurum:'<div class=\"css_red_circle\"></div>', ";
// }
//}
Data += "AracTalepButon: '', ";
//if ((item.IsTipID == 5 || item.IsTipID == 18 || item.IsTipID == 17))
//{
// Data += "AracTalepButon: '', ";
//}
//else
//{
// if (item.AracTalepID == 0)
// {
// Data += "AracTalepButon:'<img alt=\"\" title=\"Araç Talebi\" src=\"/Images/icon20/truck_16_h.png\" class=\"btnGridEdit\" onclick=\"async(function () {getReservationPopUp(0, " + item.SiparisID + ", 0, 170); });\" />', ";
// }
// else
// {
// Data += "AracTalepButon:'<img alt=\"\" title=\"Araç Talebi\" src=\"/Images/icon20/truck_16.png\" class=\"btnGridEdit\" onclick=\"async(function () {getReservationPopUp(" + item.AracTalepID + ", " + item.SiparisID + ", 0, 432); });\" />', ";
// }
//}
Data += "SipEditButon: '<img alt=\"\" title=\"Araç Talebi\" src=\"/Images/icon20/edit-ico-20.png\" class=\"btnGridEdit\" onclick=\"async(function () {getOrderPopUp(\\\'" + item.SiparisID + "\\\',380); });\" />', ";
Data += "SiparisID:" + item.SiparisID + ", ";
Data += "SiparisKod:'" + item.SiparisKod + "', ";
Data += "MusteriSipNo:'" + item.MusteriSipNo + "', ";
Data += "ProjeKod:'" + item.ProjeKod + "', ";
Data += "HareketAdi:'<div class=\"SipDurum_" + item.HareketTipID + "\">" + item.HareketAdi + "</div>', ";
Data += "SipDurumAd:'<div class=\"SipDrm_" + item.SipDurumID + "\">"+item.SipDurumAd+"</div>', ";
Data += "FirmaKisaAd:'" + item.FirmaKisaAd + "', ";
//Data += "istipadi:'<div class=\"IsTip_" + item.IsTipID + "\">" + item.istipadi + "</div>', ";
Data += "istipadi:'" + item.istipadi + "', ";
Data += "YuklemeFirma:'" + item.YuklemeFirma + "', ";
Data += "TeslimFirma:'" + item.TeslimFirma + "', ";
Data += "SiparisSevkTarihi:'" + item.SiparisSevkTarihi + "', ";
Data += "CreateDate:'" + item.CreateDate + "' ";
Data += "},";
}
Data = Data.Substring(0, Data.Length - 1);
@Html.Raw(Data);
}
13:36
Moderators
30/10/2007
Hello,
Â
Use paging and load a data at portion to 20-30 records per page and do not load 3000 at once. It is really to much.
Â
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
31 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66