Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,038

HOME > .NET Framework > Forum > java error:object required Gridview1 error รบกวน ดูให้หน่อยนะค๊ะ = =" นานแล้วอะึ้ค่ะ


 

[.NET] java error:object required Gridview1 error รบกวน ดูให้หน่อยนะค๊ะ = =" นานแล้วอะึ้ค่ะ

 
Topic : 053805



โพสกระทู้ ( 28 )
บทความ ( 0 )



สถานะออฟไลน์



error8
Code (VB.NET)
001.<html xmlns="http://www.w3.org/1999/xhtml" >
002.<head runat="server">
003.    <title>การซ่อม</title>
004.           <script type="text/javascript">
005.            function aa(rows,id)
006.            {
007.            alert(rows);
008.            alert(id);
009.         var tmp = id.split("_");
010.            var j  = 1;
011.            var sum = 0;
012.                for( i = 0 ; i < rows ; i++)
013.                {
014.                 var mixname =tmp[0] + "ctl0" + j +  tmp[2];
015.                    if (document.getElementById(mixname).value == "")
016.                    {
017.                        document.getElementById(mixname).value = 0;
018.                    }
019.                    sum = eval(sum) + eval(document.getElementById(mixname).value);
020.//                    alert(document.getElementById(mixname).value);
021.//                    alert(id)
022.//                    alert(mixname);
023.//                    alert(tmp[0] + tmp[1] + tmp[2]);
024.                    document.getElementById("Textbox")
025.                }
026.                document.getElementById("TxtLab1").value = sum;
027.            }
028.                function Checknum()
029.                    {
030.     
031.                             var chk = document.getElementById('ctl0_j_GridView1').value;
032.                             
033.                        if (isNaN(chk))
034.                             {
035.                             alert('กรุณากรอกข้อมูลเป็นตัวเลข ค่ะ !!!');
036.                                  return false;
037.                              }
038.                      return true;
039.                   
040.                         }
041.                     
042.             </script>
043.</head>
044.<body>
045.    <form id="form1" runat="server">
046.    <h2 style="text-align: center">การซ่อม</h2>
047.    <div>
048.        <table style="width:100%;">
049.            <tr>
050.                <td>
051.                    &nbsp;</td>
052.                <td colspan="2">
053.                    &nbsp;</td>
054.                <td>
055.                    <asp:Label ID="Label1" runat="server" Text="Date::"></asp:Label>
056.                </td>
057.                <td style="text-align: left">
058.                    <asp:TextBox ID="TxtDateToday" runat="server" ReadOnly="True"
059.                        style="text-align: left"></asp:TextBox>
060.                </td>
061.               
062.            </tr>
063.            <tr>
064.               <td>
065.                    <asp:Label ID="Label3" runat="server" Text="Ref::"></asp:Label>
066.                </td>
067.                <td colspan="2">
068.                    <asp:TextBox ID="TxtRef" runat="server"></asp:TextBox>
069.                </td>
070.               
071.                <td>
072.                    <asp:Label ID="Label29" runat="server" Text="Rev::"></asp:Label>
073.                </td>
074.                <td>
075.                    <asp:TextBox ID="TxtRev" runat="server"></asp:TextBox>
076.                    </td>
077.               
078.            </tr>
079.            <tr>
080.                <td>
081.                    <asp:Label ID="Label2" runat="server" Text="EOR No::"></asp:Label>
082.                </td>
083.                <td colspan="2">
084.                    <asp:DropDownList ID="Ddlloc" runat="server">
085.                        <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
086.                    </asp:DropDownList>
087.                </td>
088.                <td>
089.                    <asp:Label ID="Label5" runat="server" Text="Repair Type  ::"></asp:Label>
090.                </td>
091.                <td>
092.                    <asp:DropDownList ID="DdlReType" runat="server">
093.                        <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
094.                    </asp:DropDownList>
095.                </td>
096.                            </tr>
097.             <tr>
098.                <td>
099.                    <asp:Label ID="Label4" runat="server" Text="Container No ::"></asp:Label>
100.                 </td>
101.                <td colspan="2">
102.                    <asp:TextBox ID="Txtconid" runat="server"></asp:TextBox>
103.                 </td>
104.                <td>
105.                    <asp:Label ID="Label6" runat="server" Text="TaRiff"></asp:Label>
106.                 </td>
107.                <td>
108.                    <asp:DropDownList ID="DdlTariff" runat="server">
109.                        <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
110.                    </asp:DropDownList>
111.                 </td>
112.                               
113.            </tr>
114.             <tr>
115.                <td>
116.                    <asp:Label ID="Label7" runat="server" Text="Currency ::"></asp:Label>
117.                 </td>
118.                <td colspan="2">
119.                    <asp:DropDownList ID="DdlCurency" runat="server">
120.                        <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
121.                    </asp:DropDownList>
122.                 </td>
123.                <td>
124.                    <asp:Label ID="Label9" runat="server" Text="ISO SIZE/TYPE" Width="148px"></asp:Label>
125.                 </td>
126.                <td>
127.                    <asp:DropDownList ID="DdlIsosize" runat="server">
128.                        <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
129.                    </asp:DropDownList>
130.                 </td>
131.                                
132.            </tr>
133.             <tr>
134.                <td>
135.                    <asp:Label ID="Label8" runat="server" Text="DOM(mm/yyyy)" Width="120px"></asp:Label>
136.                 </td>
137.                <td colspan="2">
138.                    <asp:TextBox ID="TxtDom" runat="server"></asp:TextBox>
139.                 </td>
140.                <td>
141.                    &nbsp;</td>
142.                <td>
143.                    &nbsp;</td>
144.                 
145.                 
146.            </tr>
147.             <tr>
148.                <td>
149.                    <asp:Label ID="Label31" runat="server" Text="Orig Est."></asp:Label>
150.                 </td>
151.                <td>
152.                    <asp:TextBox ID="TxtEst" runat="server"></asp:TextBox>
153.                    <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtEst"  Format="dd/MM/yyyy" >
154.                    </asp:CalendarExtender>
155.                 </td>
156.                <td>
157.                    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
158.                    </asp:ToolkitScriptManager>
159.                 </td>
160.                <td>
161.                    <asp:Label ID="Label15" runat="server" Text="Status::"></asp:Label>
162.                 </td>
163.                <td>
164.                    <asp:DropDownList ID="Ddlstatus" runat="server">
165.                        <asp:ListItem>Approved</asp:ListItem>
166.                        <asp:ListItem>Pending</asp:ListItem>
167.                        <asp:ListItem>Verified</asp:ListItem>
168.                        <asp:ListItem>Dispute</asp:ListItem>
169.                        <asp:ListItem>Completed</asp:ListItem>
170.                    </asp:DropDownList>
171.                 </td>
172.                              
173.            </tr>
174.             <tr>
175.                <td>
176.                    <asp:Label ID="Label30" runat="server" Text="Lastest Est."></asp:Label>
177.                 </td>
178.                <td>
179.                    <asp:TextBox ID="TxtLEst" runat="server"></asp:TextBox>
180.                    <asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="TxtLEst" Format="dd/MM/yyyy">  
181.                    </asp:CalendarExtender>
182.                 </td>
183.                <td>
184.                    &nbsp;</td>
185.                <td>
186.                    <asp:Label ID="Label12" runat="server" Text="Labour ::"></asp:Label>
187.                 </td>
188.                <td>
189.                    <asp:TextBox ID="TxtLab1" runat="server" ReadOnly="True"></asp:TextBox>
190.                 </td>
191.               
192.                 
193.            </tr>
194.             <tr>
195.                <td>
196.                    <asp:Label ID="Label10" runat="server" Text="Gate In ::"></asp:Label>
197.                 </td>
198.                <td>
199.                    <asp:TextBox ID="TxtGateIn" runat="server"></asp:TextBox>
200.                    <asp:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="TxtGateIn" Format="dd/MM/yyyy">
201.                    </asp:CalendarExtender>
202.                 </td>
203.                <td>
204.                    &nbsp;</td>
205.                <td>
206.                    <asp:Label ID="Label13" runat="server" Text="Mat::"></asp:Label>
207.                 </td>
208.                <td>
209.                    <asp:TextBox ID="TxtMat1" runat="server" ReadOnly="True"></asp:TextBox>
210.                 </td>
211.               
212.                 
213.            </tr>
214.             <tr>
215.                <td>
216.                    <asp:Label ID="Label11" runat="server" Text="Completion::"></asp:Label>
217.                 </td>
218.                <td>
219.                    <asp:TextBox ID="TxtCompletion" runat="server">
220.                    </asp:TextBox><asp:CalendarExtender ID="CalendarExtender4" runat="server" TargetControlID="TxtCompletion"  Format ="dd/MM/yyyy">
221.                    </asp:CalendarExtender>
222.                 </td>
223.                <td>
224.                    &nbsp;</td>
225.                <td>
226.                    <asp:Label ID="Label14" runat="server" Text="ToTal::"></asp:Label>
227.                 </td>
228.                <td>
229.                    <asp:TextBox ID="Txttotal" runat="server" AutoPostBack="true " ReadOnly="True"></asp:TextBox>
230.                 </td>
231.                
232.                 
233.            </tr>
234.             <tr>
235.                <td>
236.                    &nbsp;</td>
237.                <td>
238.                    &nbsp;</td>
239.                <td>
240.                    &nbsp;</td>
241.                <td>
242.                    <asp:Label ID="Label33" runat="server" Text="DMG::"></asp:Label>
243.                </td>
244.                <td>
245.                    <asp:TextBox ID="Txtdmg" runat="server" ReadOnly="True"></asp:TextBox>
246.                </td>
247.                 
248.                 
249.            </tr>
250.             <tr>
251.                <td>
252.                    &nbsp;</td>
253.                <td>
254.                    &nbsp;</td>
255.                <td style="text-align: center">
256.                    <asp:Label ID="Lmsg" runat="server" Font-Bold="True" ForeColor="Red" Text="Msg"
257.                        Visible="False" style="text-align: center"></asp:Label>
258.                 </td>
259.                <td>
260.                    &nbsp;</td>
261.                <td>
262.                    &nbsp;</td>
263.                 
264.                 
265.            </tr>
266.             <tr>
267.                <td>
268.                    <asp:Label ID="Label32" runat="server" Text="Template No." Width="92px"></asp:Label></td>
269.                <td>
270.                    <asp:TextBox ID="TxtTempno" runat="server" Width="100px"></asp:TextBox>
271.                    <asp:Button ID="Btnok" runat="server" Text="ตกลง" /></td>
272.                <td>
273.                    &nbsp;</td>
274.                <td>
275.                    <asp:Label ID="Label16" runat="server" Text="No."></asp:Label>
276.                    
277.                    <asp:TextBox ID="TxtReDe_id" runat="server" ReadOnly="True"></asp:TextBox></td>
278.                <td>
279.                    
280.                    &nbsp;</td>
281.            </tr>
282.             </table></div>
283.            <h3 style="text-align: center">รายละเอียดการซ่อม</h3>
284.    
285.       
286.       <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
287.           BorderStyle="Dashed" CellPadding="4" ForeColor="#333333" GridLines="None">
288.           <RowStyle BackColor="#EFF3FB" />
289.           <Columns>
290.               <asp:BoundField DataField="Loc" HeaderText="Location" />
291.               <asp:TemplateField HeaderText="Component">
292.                   <ItemTemplate>
293.                       <asp:DropDownList ID="DdlCom" runat="server" AppendDataBoundItems="True"
294.                           AutoPostBack="True" Width="100px">
295.                           <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
296.                       </asp:DropDownList>
297.                   </ItemTemplate>
298.               </asp:TemplateField>
299.               <asp:TemplateField HeaderText="DMG">
300.                   <ItemTemplate>
301.                       <asp:DropDownList ID="DdlDmg" runat="server" AppendDataBoundItems="True"
302.                           AutoPostBack="True" Width="100px">
303.                           <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
304.                       </asp:DropDownList>
305.                   </ItemTemplate>
306.               </asp:TemplateField>
307.               <asp:TemplateField HeaderText="Repair">
308.                   <ItemTemplate>
309.                       <asp:DropDownList ID="DdlRepair" runat="server" AppendDataBoundItems="True"
310.                           AutoPostBack="True" Width="100px">
311.                           <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
312.                       </asp:DropDownList>
313.                   </ItemTemplate>
314.               </asp:TemplateField>
315.               <asp:TemplateField HeaderText="Type">
316.                   <ItemTemplate>
317.                       <asp:DropDownList ID="DDdlType" runat="server" Width="100px">
318.                           <asp:ListItem>-กรุณาเลือก-</asp:ListItem>
319.                           <asp:ListItem>DMG</asp:ListItem>
320.                           <asp:ListItem>W/T</asp:ListItem>
321.                           <asp:ListItem>I/R</asp:ListItem>
322.                           <asp:ListItem>CLE</asp:ListItem>
323.                           <asp:ListItem>UPG</asp:ListItem>
324.                       </asp:DropDownList>
325.                   </ItemTemplate>
326.               </asp:TemplateField>
327.               <asp:TemplateField HeaderText="QTY">
328.                   <ItemTemplate>
329.                       <asp:TextBox ID="TxtQty" runat="server" Width="50px"></asp:TextBox>
330.                   </ItemTemplate>
331.               </asp:TemplateField>
332.               <asp:TemplateField HeaderText="L">
333.                   <ItemTemplate>
334.                       <asp:TextBox ID="TxtL" runat="server" Width="50px"></asp:TextBox>
335.                   </ItemTemplate>
336.               </asp:TemplateField>
337.               <asp:TemplateField HeaderText="W">
338.                   <ItemTemplate>
339.                       <asp:TextBox ID="TxtW" runat="server" Width="50px"></asp:TextBox>
340.                   </ItemTemplate>
341.               </asp:TemplateField>
342.               <asp:TemplateField HeaderText="Hour">
343.                   <ItemTemplate>
344.                       <asp:TextBox ID="TxtHour" runat="server" Width="50px"></asp:TextBox>
345.                   </ItemTemplate>
346.               </asp:TemplateField>
347.               <asp:TemplateField HeaderText="Lobour">
348.                   <ItemTemplate>
349.                       <asp:TextBox ID="TxtLabour" runat="server" Width="80px"></asp:TextBox>
350.                   </ItemTemplate>
351.               </asp:TemplateField>
352.               <asp:TemplateField HeaderText="Material">
353.                   <ItemTemplate>
354.                       <asp:TextBox ID="TxtMaterial" runat="server" Width="80px"></asp:TextBox>
355.                   </ItemTemplate>
356.               </asp:TemplateField>
357.               <asp:TemplateField HeaderText="Cost">
358.                   <ItemTemplate>
359.                       <asp:TextBox ID="TxtCost" runat="server" ReadOnly="True" Width="80px"></asp:TextBox>
360.                   </ItemTemplate>
361.               </asp:TemplateField>
362.           </Columns>
363.           <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
364.           <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
365.           <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
366.           <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
367.           <EditRowStyle BackColor="#2461BF" />
368.           <AlternatingRowStyle BackColor="White" />
369.       </asp:GridView>
370.       <div>
371.       <table align="center">
372.       <tr>
373.       <td>
374.       <asp:Button ID="btnAdd" runat="server" Text="เพิ่ม" /></td>
375.       <td><asp:Button ID="btnCancle" runat="server" Text="ยกเลิก" /></td>
376.       <td><asp:Button ID="btnaddpic" runat="server" Text="เพิ่มรูปภาพรอยแผลตู้" /></td>
377.       <td style="text-align: center"><asp:Button ID="btnShow" runat="server" Text="แสดงข้อมูล" /> </td>
378.      </tr>
379. </table></div>
380.        <asp:Panel ID="Panel2" runat="server" style="text-align: center" Visible="False" Width="270px">
381.            <div align="center">
382.                <h3>
383.                    อัพโหลดรูปภาพที่ท่านต้องการ</h3>
384.                <asp:FileUpload ID="FileUpload1" runat="server" />
385.                <br />
386.                <asp:FileUpload ID="FileUpload2" runat="server" />
387.                <br />
388.                <asp:FileUpload ID="FileUpload3" runat="server" />
389.                <br />
390.                <asp:FileUpload ID="FileUpload4" runat="server" />
391.                <br />
392.                <asp:FileUpload ID="FileUpload5" runat="server" />
393.                <br />
394.                <asp:Label ID="Label17" runat="server" Font-Bold="True" ForeColor="Red"
395.                    Text="[MSG]" Visible="False"></asp:Label>
396.                <br />
397.                <asp:Button ID="btnpic" runat="server" Text="ตกลง" />
398.             </div>
399.        </asp:Panel>
400.    </form>
401.</body>
402.</html>

คือ alert ออกมาแล้ว เหมือนมันนับ หัวตาราง เป็น Gridview1_Ctl02_Txtlabour แต่ถ้า ตารางเกิน 8 row มันจะเออเล่อร์ object requiired



Tag : .NET, MySQL, JavaScript, Web (ASP.NET), VB.NET

Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2010-12-28 22:28:12 By : jaoa View : 1329 Reply : 1
 

 

No. 1



โพสกระทู้ ( 74,059 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

อยากช่วยน่ะครับ แต่เรื่อง ClientID ของ ASP.NET อาจจะต้องใช้เทคนิคในการตรวจสอบพร้อมกับ Debug ของใช้ Firebug ดูครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-12-29 09:13:22 By : webmaster
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : java error:object required Gridview1 error รบกวน ดูให้หน่อยนะค๊ะ = =" นานแล้วอะึ้ค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)





ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2025 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่