Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Jgrid bad performance(with json data )
12/09/2014
18:04
Avatar
blgsyrmhnds
Member
Members
Forum Posts: 4
Member Since:
29/08/2014
sp_UserOfflineSmall Offline

   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/09/2014
13:36
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information