| Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development | Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
| Author | Forum: PowerWEB LiveControls for ASP.NET Topic: LiveDataGrid selection problem |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 16, 2006 5:21 AM Hi, I have a datagrid, the grid is paged so it displays 2 pages. I have some code in the page_load to fill the dataset and bind it to the grid. This code is run only if !IsPostBack. When there's a page change, the called method, change CurrentPageIndex and fill dataset again then redo bind. So far nothing wrong the page change correctly. I added a new column in my grid. A select column to display selected row. I added it at design time, without adding anything else. When I select a row everything ok but when I try to select another one it dosen't "unselect" the former selected row. I mean there's a multiple selection behavior that I don't want. I think it's a very simple error but I cannot figure out what it is! Thanx in advance! DP |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted June 16, 2006 11:36 AM I can't duplicate this. Let's get some more info. - ASP.NET version (1.0, 1.1, 2.0?) - browser & version Also, is your code short enough to post here (or at least the LiveDataGrid server tags?) |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 19, 2006 4:02 AM InternetExplorer version 6. ASP.net version 1.1 The most relevant line of code-behind follows: private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { sqlDataAdapter1.Fill(dataSet1); LiveDataGrid1.DataSource = dataSet1; LiveDataGrid1.DataBind(); } } private void LiveDataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e) { LiveDataGrid1.CurrentPageIndex = e.NewPageIndex; sqlDataAdapter1.Fill(dataSet1); LiveDataGrid1.DataSource = dataSet1; LiveDataGrid1.DataBind(); } Here server tags: <cc1:livedatagrid id="LiveDataGrid1" style="Z-INDEX: 101; LEFT: 32px; POSITION: absolute; TOP: 48px" runat="server" EnableCallback="False" PageSize="5" AllowPaging="True" Height="88px" Width="208px" Font-Size="X-Small" Font-Names="Verdana" BackColor="White" BorderColor="#E7E7FF" DataPersistenceType="ViewState" BorderWidth="1px" GridLines="Horizontal" CellPadding="3" BorderStyle="None"> <AlternatingItemStyle BackColor="#F7F7F7"></AlternatingItemStyle> <FooterStyle ForeColor="#4A3C8C" BackColor="#B5C7DE"></FooterStyle> <ItemStyle ForeColor="#4A3C8C" BackColor="#E7E7FF"></ItemStyle> <Columns> <cc1:LiveButtonColumn Text=">>>" ButtonType="LinkButton" ImageUrl="" CommandName="Select"></cc1:LiveButtonColumn> </Columns> <HeaderStyle Font-Bold="True" ForeColor="#F7F7F7" BackColor="#4A3C8C"></HeaderStyle> <SelectedItemStyle Font-Bold="True" ForeColor="#F7F7F7" BackColor="#738A9C"></SelectedItemStyle> <PagerStyle HorizontalAlign="Right" ForeColor="#4A3C8C" BackColor="#E7E7FF" Mode="NumericPages"></PagerStyle> </cc1:livedatagrid> Regards. DP |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted June 19, 2006 9:33 AM Still can't duplicate this. Are you doing anything in the LiveDataGrid.SelectedIndexChanged event (or setting the SelectedIndex anywhere else in your code). Try this. Set Debug=true on your LiveDataGrid to create a JavaScript log. Rerun your test, taking the least amount of steps as possible to limit the amount of JavaScript generated. Then, post the applicable JavaScript here. |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 19, 2006 10:43 AM No I didn't set SelectedIndexChanged. When I select the first row: request: pwEventSrc=LiveDataGrid1:_ctl3:_ctl0&BrowserType=IE&LiveTextBox1=&requestId=request0&__EVENTTARGET=LiveDataGrid1:_ctl3:_ctl0&__EVENTARGUMENT=&eventToRaise=Click&eventArgs=48@95&pwCallback=true&pwCallbackNumber=0&pwCallbackType=XmlHttp&pwPageKey=d5cfe2a1d4a54b9597c37735d6757f6d response: pwChangeRowStyle("LiveDataGrid1__ctl3","style.backgroundColor='#738A9C';style.color='#F7F7F7';style.fontWeight='bold'");if(pwObj('LiveDataGrid1__ctl3__ctl0'))pwObj('LiveDataGrid1__ctl3__ctl0').style.color = '#F7F7F7';pwSetStyleString("LiveDataGrid1__ctl3__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl4__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl5__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl6__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl7__ctl0","style.color=''");pwUpdateViewState ('long character string') When I select another one row: request: pwEventSrc=LiveDataGrid1:_ctl4:_ctl0&BrowserType=IE&LiveTextBox1=&requestId=request0&__EVENTTARGET=LiveDataGrid1:_ctl4:_ctl0&__EVENTARGUMENT=&eventToRaise=Click&eventArgs=60@144&pwCallback=true&pwCallbackNumber=2&pwCallbackType=XmlHttp&pwPageKey=d5cfe2a1d4a54b9597c37735d6757f6d response: pwChangeRowStyle("LiveDataGrid1__ctl4","style.backgroundColor='#738A9C';style.color='#F7F7F7';style.fontWeight='bold'");if(pwObj('LiveDataGrid1__ctl4__ctl0'))pwObj('LiveDataGrid1__ctl4__ctl0').style.color = '#F7F7F7';pwSetStyleString("LiveDataGrid1__ctl3__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl4__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl5__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl6__ctl0","style.color=''");pwSetStyleString("LiveDataGrid1__ctl7__ctl0","style.color=''");pwUpdateViewState ('long character string') |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 21, 2006 6:17 AM Another problem. After private void LiveDataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e) { LiveDataGrid1.CurrentPageIndex = e.NewPageIndex; sqlDataAdapter1.Fill(dataSet1); LiveDataGrid1.DataSource = dataSet1; LiveDataGrid1.DataBind(); } The page is changed correctly, but CurrentPageIngex return to 0! Did I miss something? Regards DP |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted June 21, 2006 5:27 PM Do you know which version of LiveControls you are using? |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 22, 2006 4:44 AM LiveControl 1.4.1.0 |
| dickeyr From: Fernandina Beach, FL USA Posts: 6 Member Since: 01/12/06 |
posted June 23, 2006 3:04 PM I've been having an issue also with CurrentPageIndex staying 0. I can set the value and the grid changes, but if I want to display the grid current page value, it's always 0. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted June 26, 2006 11:16 AM Using the current version of LiveControls (v1.5.1.0) the CurrentPageIndex of a LiveDataGrid appears to be reading correctly in a callback both before and after it is set. Have you tried the latest version? |
| dickeyr From: Fernandina Beach, FL USA Posts: 6 Member Since: 01/12/06 |
posted June 26, 2006 11:23 AM I just dl'd the latest version on friday and it really changed the way my app is working. I have other issues to "fix" first. I haven't had a chance to look at the currentpageindex value yet. I was on 1.1.3 previously. |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 27, 2006 4:25 AM I'm using version 1.5.1 and is still the same. I tried to look at the example and they works but when I try to do the same it doesn't. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted June 27, 2006 9:28 AM I am also unable to replicate the "multiple selection" problem you've described using LiveControls version 1.5.1.0, ASP.NET 1.1 and IE 6. I used your LiveDataGrid configuration and created a sample application and have emailed to you. Please let us know if you are still seeing the problem. If so, go directly to the project bin directory and get the properties of the LiveControls DLL to check the version. Sometimes Visual Studio reports an incorrect version from the actual DLL. |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 28, 2006 5:16 AM I tried your example and I'm facing the same problem. Any Ideas? Problem with the enviroment? The DLL's version is right I installed the last version few days ago. Thanx DP |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted June 28, 2006 3:50 PM Can you check the web application configuration to see what version of ASP.NET it is running under? This should not have any effect since I have compiled under 1.0 and 1.1 with no difference in behavior. Also, what are the steps you take after the page loads? Which items are clicked in which order? |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 29, 2006 4:57 AM ASP.NET version is 1.1; After page_load I select a row and then another, nothing else. I tried to load the same project on another host and it didn't work as well. Then I tried another host and it worked! The former two hosts are win 2000, the last one a brand new installation of win 2003 server. Is it possible that some third party controls previously installed on the two not well working machine, could have caused the problem? Regards DP |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted June 29, 2006 9:40 AM Ah, this may be the missing piece. Which version of IIS is running on the Windows 2000 machines? I will do some independent testing, but an older IIS version on those machines may be contributing. |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted June 29, 2006 11:14 AM IIS version is 5.0; That's the win 2000's IIS version. Regards DP |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted June 30, 2006 11:45 AM After doing some more investigation we have found that there are some bugs with the .NET Framework 1.1 under IIS 5.0 that were cleared up with service pack 1. When we installed the service pack on a Windows 2000 machine that exhibited this behavior, the issue was corrected. You can find Service Pack 1 here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=A8F5654F-088E-40B2-BBDB-A83353618B38 |
| alexpassa@tiscalinet.it From: turin, Italy Posts: 10 Member Since: 05/02/06 |
posted July 7, 2006 4:39 AM Now it works fine! Thanks for your outstanding support! DeltaPrime s.r.l. |
| Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|