User Profile & Activity

Beryl Bucher Member
Page
of 2

Thank you!  I'll try the Ribbon = true for the SmartBatchUpdate.  In the meantime, I found the solution to the second question.  Instead of just doing a databind() to refresh the datasource, if I do a

 

webGrid1.ClientAction.Refresh();

 

it works perfectly, so I'm good.  I'll play with the SmartBatch once I get a second and post my results here.

 

Beryl

Thanks for your help!  I did the first bit, so that the webgrid code looks like this:

<ISWebGrid:WebGrid ID="wgClinicAllocation" runat="server" DataKeyFields="GenericSecuritySetting, GenericSecuritySettingDesc" DataSourceID="SqlDataClinicAllocation" UseDefaultStyle="True" Width="200px" BrowserPrintSettings-PrintStatusBar="True" DefaultStyleMode="Silver" visible="false" Height="180px"> <LayoutSettings AllowAddNew="No" AllowDelete="No" AllowEdit="Yes" AllowBatchUpdate="true" StatusBarVisible="False" ShowRefreshButton="False" AllowContextMenu="False" > <BatchUpdateSettings AllowUndoChanges="False" PromptUnsavedChanges="False" PromptOnUndoAllChanges="False" /> </LayoutSettings>

 

However, now when I make a change in the grid I get the error message:

Microsoft JScript runtime error: 'undefined' is null or not an object

on the line:

textE1.innerHTML =this.GetString("CommonText/PendingChanges").replace("{0}",count);

Can you help?  Thank you!

Beryl

 

On a second question: I've found a work-around where I don't use SmartBatchUpdating, but rather use a temporary table with real-time updates.  This works for me, except: the webgrid is in a dialog box with many other controls, called from another page.  It only works every other time.  The first time the dialog box is called, the webgrid fills in nicely.  If I cancel and go back, all my controls are there except the webgrid, which is empty.  If I cancel again and go back, the webgrid is good.

 

A solution to either of these issues would work for me!

Thank you for your help.  I have used SmartBatchUpdate and I have a couple of significant issues remaining:

 - When I have a postback on a different control (e.g., a drop-down listbox on the page), I receive the message "Are you sure you want to navigate away from this page?"  This is confusing the the user because they are not navigating away from the page, they are simply entering another value on the page. How do I get the grid to not give that message? 

 - I'd prefer not to see the ribbon with the accept / cancel pending changes. 

 I tried all the samples, but every one of them seems to give this message as well.  Please help!

 

 

Below is the code for the webgrid:

 

<ISWebGrid:WebGrid ID="wgClinics" runat="server" Height="190px" Width="293px" onbatchupdate="wgClinics_BatchUpdate" DataSourceID="SqlDataAllocationsToClinics" > <LayoutSettings AllowEdit="Yes"> <HeaderStyle Wrap="False"></HeaderStyle>

</LayoutSettings>

<RootTable> <Columns> <ISWebGrid:WebGridColumn Caption="NumClinicID" DataMember="NumClinicID" DataType="System.Int32" Name="NumClinicID" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="clinicname" DataMember="clinicname" Name="clinicname" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Alloc" DataMember="Alloc" DataType="System.Decimal" Name="Alloc" Width="100px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid>
All times are GMT -5. The time now is 6:43 PM.
Previous Next