Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: LiveDropDownList & LiveDatagrid
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted July 24, 2006 11:05 PM

I have a livedatagrid that bind more than 200 over rows. Every 40 seconds (LiveTimer) it will bind the livedatagrid with a new row if any. At the same time I have bind a LiveDropDownList & LiveRadioButtonList in the same column.
I tried to test whether the dropdownlist will grab the right row. When the grid first load the dropdownlist did get the right row, but once the grid has been updated, everytime i do a dropdownlist selectindexchanged it will grab the row before it. Is this consider a bug or there's something wrong with my codes ?. Am i missing something.


------------------------------Code ---------------
<cc1:LiveDataGrid id="LiveDataGrid1" runat="server" Font-Size="XX-Small" Font-Names="Verdana" AllowPaging="True"
PageSize="50" AutoGenerateColumns="False" Width="100%" CellPadding="3" BorderWidth="1px" BorderColor="#E0E0E0">
<ItemStyle BackColor="White"></ItemStyle>
<HeaderStyle ForeColor="White" BackColor="Gray"></HeaderStyle>
<Columns>
<cc1:LiveBoundColumn Visible="False" DataField="SMSInboxID"></cc1:LiveBoundColumn>
<cc1:LiveBoundColumn Visible="False" DataField="DJMsg"></cc1:LiveBoundColumn>
<cc1:LiveBoundColumn DataField="bil" HeaderText="Bil">
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</cc1:LiveBoundColumn>
<cc1:LiveBoundColumn DataField="msg" HeaderText="Mesej">
<ItemStyle VerticalAlign="Top"></ItemStyle>
</cc1:LiveBoundColumn>
<cc1:LiveBoundColumn DataField="timereceived" HeaderText="Masa">
<ItemStyle VerticalAlign="Top"></ItemStyle>
</cc1:LiveBoundColumn>
<cc1:LiveBoundColumn DataField="note" HeaderText="Catatan">
<ItemStyle VerticalAlign="Top"></ItemStyle>
</cc1:LiveBoundColumn>
<cc1:LiveTemplateColumn HeaderText="Tindakan">
<ItemTemplate>
<cc1:LiveRadioButtonList id="LiveRadioButtonList1" runat="server" Width="100%" Font-Names="Verdana" Font-Size="XX-Small">
<asp:ListItem Value="Baca">Baca</asp:ListItem>
<asp:ListItem Value="Hapus">Hapus</asp:ListItem>
<asp:ListItem Value="Sensor">Sensor</asp:ListItem>
<asp:ListItem Value="None">None</asp:ListItem>
</cc1:LiveRadioButtonList>
<BR>
<BR>
<cc1:LiveDropDownList id="LiveDropDownList1" runat="server" Width="100%" OnSelectedIndexChanged="DropDownChanged">
<asp:ListItem Value="-PILIH-">-PILIH-</asp:ListItem>
<asp:ListItem Value="POLIS">POLIS</asp:ListItem>
<asp:ListItem Value="TIMBR">TIMBR</asp:ListItem>
<asp:ListItem Value="DBKL">DBKL</asp:ListItem>
<asp:ListItem Value="PUSPEL">PUSPEL</asp:ListItem>
</cc1:LiveDropDownList>
</ItemTemplate>
<ItemStyle VerticalAlign="Top"></ItemStyle>
</cc1:LiveTemplateColumn>
</Columns>
<PagerStyle ForeColor="White" Position="TopAndBottom" BackColor="Gray" Mode="NumericPages"></PagerStyle>
</cc1:LiveDataGrid></TD>

-------------- Code Behind -------------------

Protected Sub DropDownChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
    Dim d As LiveDropDownList = sender
    Dim c As LiveTableCell
    Dim item As LiveDataGridItem
    Dim SMSInboxID As String = ""
    Dim App As String = ""

    c = d.Parent
    item = c.Parent
    SMSInboxID = item.Cells(0).Text
    App = d.SelectedValue

    If App = "POLIS" Then
      LiveDataGrid1.BufferedScript.Write("window.open('SendSMSExApp.aspx?rid=" & SMSInboxID & "',null,'height=400, width=450,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no');")
    ElseIf App = "TIMBR" Then
      LiveDataGrid1.BufferedScript.Write("window.open('SendSMSReply.aspx?rid=" & SMSInboxID & "',null,'height=400, width=450,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no');")
    ElseIf App = "PUSPEL" Or App = "DBKL" Then
      LiveDataGrid1.BufferedScript.Write("window.open('SendEmail.aspx?rid=" & SMSInboxID & "',null,'height=400, width=450,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no');")
    End If

  End Sub
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted July 26, 2006 11:02 AM

Hi. Your code works fine for me. I had to make some minor modifications (to remove the DataField dependencies, etc).

You can download my test webform at
http://support.dart.com/downloads/support_7046.zip . Try it and let me know if it works for you.
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted July 26, 2006 8:50 PM

Thanks Jeff,

Unfortunately the webform that you posted is wrong too. when i first load it, i can get all the correct ID, but once the 4th row has been added i cant seem to get the ID for that row. even the OnSelectedIndexCHanged is not firing.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted July 27, 2006 5:05 PM

Hmmmm. It works fine for me. It always reports the correct ID even for the newly added rows. Did you make any modifications to the application? Also, what is your setup (VS.NET version, browser version, etc). Did you make any adjustments to LiveControls in your web.config?
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted July 27, 2006 7:23 PM

Well i just created a new project. use the webform that u asked me to try and that's all. Im currently using VS.NET 2003 7.1.3088, .NET Framework 1.1, using IE 6 Service Pack 2. Nope so far i have never make any adjustment in the webconfig. I just installed LiveControl, copy the dll in my project and do a simple drag & drop that's all. Will try to run the prog u made. Maybe im missing something over here.
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted July 27, 2006 7:30 PM

<httpHandlers>
   <add verb="*" path="Dart.PowerWEB.LiveControls.GetResource.aspx" type="Dart.PowerWEB.LiveControls.ResourceHttpHandler,Dart.PowerWEB.LiveControls" />
  </httpHandlers>
  <httpModules>
   <add name="CallbackManager" type="Dart.PowerWEB.LiveControls.CallbackManager,Dart.PowerWEB.LiveControls" />
  </httpModules>

** This is taken from my web.config
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted July 28, 2006 10:13 AM

Your setup is pretty much identical to mine...and your web.config looks ok. What version are you using? (sorry, I should have asked this first) You can get the latest update at http://www.dart.com/support/updatecenter.asp . The last update was a few weeks ago and contained some fixes for LiveDataGrid child controls.
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted July 28, 2006 10:22 AM

It's Version=1.5.2.0, im still testing it as we speak hehe.
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted July 28, 2006 9:04 PM

Still no luck, I created a new project a fresh one, simply read a live database that is always being updated. whenever a new row have been added i cant seem to get the right id for that particular row. weird, but that's what happen. any suggestion? im using the trial version.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted July 31, 2006 5:25 PM

Is it possible for me to remotely access your machine to see what you are seeing?
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted August 1, 2006 9:36 PM

do i need to do any modification on the Livedropdownlist ? Im getting frustrated with all this. Here is what im gonna do, im going to install it on every one of my colleagues machine n try to run the prog that u sent me the other day. will post you on the result as soon as possible.
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted August 1, 2006 10:46 PM

ahaa .. i think i need to reinstall my VS2003 there's some misconfig.. coz when i run it in my colleague's machine its running perfectly... thanks anyway,... :D
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted August 2, 2006 6:48 AM

its just so weird, after reinstalling VS2003 with PowerWeb LiveControl i still cant get the right row im my machine. but the same program that i tested on my friend's machine is working. Can you please gimme the requirement to run PW LiveControl ? Im using Windows XP Pro while my friend is using Windows 2000.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted August 2, 2006 10:13 AM

The requirements are listed here at
http://www.dart.com/powerweb/livecontrols_environments.asp .

This is very strange. Now that it's been isolated to your machine, let's try to figure out what's different between your machine and others.
- Try using different browsers (FireFox, Opera). Are the results different?
- Check your browser security settings.
- Try removing our CallbackManager HttpModule from the web.config.
kennyshah18
starwars_mmu@yahoo.com

From: Shah Alam, Malaysia
Posts: 14
Member Since: 07/21/06
posted August 3, 2006 5:02 AM

After numerous trial i have finally found the culprit to my problem. It seems that i need to update my .NET Framework to .NET Framework 1.1 Service Pack 1. There's some bug in .NET Framework 1.1. ANyway thanks Jeff for the support I appreciate it alot.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted August 3, 2006 10:03 AM

That's great news! I'll open a bug report to investigate the compatibility issue with .NET 1.1. Thanks for the information.
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX