User Profile & Activity

James Member
Page
of 14
Posted: September 11, 2009 10:33 PM

The padding for cell seems like controlled by other properties in the Grid (for easy customization), such as CellPaddingDefault and CellSpacingDefault in LayoutSettings. However, this setting would certainly change all the padding sides consistently, and not only the left padding.

To change only specific side of padding, using your approach that use !important mark should be allright.

Hi Aaron,

ISDataSource acts as medium object that connects data into UI, so you can actually use just any kind of backend. Since ISDataSource supports native connection to both dataset-generated object and custom object, you can develop your data access layer using the way you preferred, and then use ISDataSource to easily connect that object into databound UI controls such as WebGrid, WebCombo, and so on.

To give you a quick idea how ISDataSource works, see the following code which retrieves data from custom data access layer and then bound to a WebGrid.

<ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataSourceID="ISDataSource1">
  ...
</ISWebGrid:WebGrid>
<ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaType="CustomObject">
      <Tables>
            <ISDataSource:ISDataSourceTable DataObjectTypeName="MyData" 
DeleteMethod="Delete" InsertMethod="Insert" SelectMethod="GetData" TableName="Customers" TypeName="MyDataAccess" UpdateMethod="Update"> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource>

To try the sample directly, open WebGrid 7.0 Tutorial C# solution from the program group, then expand V5.0 folder and then IntersoftDataSourceControl folder. Finally, look for CustomDataObject_Flat.aspx sample. There are also many useful samples that you can find in that folder. 

Hope this helps,
James.

Posted: September 11, 2009 1:58 PM

Hi Holger,

Are you using Windows x64 bit edition on your new PC? There may be several steps needed to be done for x64 installation.

Posted: September 11, 2009 1:40 PM

Xedem,

I don't think Firebug can show the total bytes of the compressed size. AFAIK, only HttpWatch and some other commercial tools can detect the compressed size properly.

You can try to check using HttpWatch in Internet Explorer. If it works in IE, then it also works in other browsers that support content encoding.

Hope this helps,
James.

Posted: September 10, 2009 10:33 AM

Staffan,

You need to update the Framework assemblies to your hosting company as well. Framework assemblies are ISNet.dll, ISNet.WebUI.dll, and ISNet.WebUI.Resources.dll.

Hope this helps.

Posted: September 10, 2009 10:19 AM

Arun,

With the setting turned off, the data caching will still work in subsequent postback and FlyPostBack requests. However, the data cache will be invalidated on first page load (non postback condition).

Looking at your scenario, I'd suggest you to set the AlwaysUseCachedDataOnFirstLoad property to false to ensure your data is fresh upon first load.

The GetCachedDataSource is the correct method to get cached data, and not .DataSource property. 

Posted: September 10, 2009 9:58 AM

Staffan,

I don't think Exporting can take account CssClass styles because CssClass is generally used in client-side, not server-side. To make it works in both client and server, you can continue using CssClass for client-side styles and add the server style programmatically in Exporting event.

Eg, grid.LayoutSettings.HeaderStyle.HorizontalAlign = HorizontalAlignment.Right;

Hope this helps.

Posted: September 10, 2009 6:27 AM

Siva, the 2009 updates should work with your existing code. However, like any applications, you still have to test your application before deploying.

Posted: September 9, 2009 11:52 AM

Michael,

Yes, Refresh is an asynchronous AJAX process. But you can also run it synchronously by simply setting the Asynchronous property to false.

Here's how:

grid.XmlHttp.Asynchronous = false;

Remember to set it to true again after your Refresh() method call.

Hope this helps,
James.

Posted: September 9, 2009 6:32 AM

Now, I use ClientSideEvent OnAcceptAllChanges. Perhaps, somebody knows a better way

function grd_OnAcceptAllChanges(controlId){
    var grd = ISGetObject(controlId);
    var DelChanges = grd.GetChanges("Deleted");
    
    for (var i in DelChanges)
    {
        if (DelChanges[i].Row.GetCell("Dependencies").Value != "0") {
            DelChanges[i].Row.UndoChanges();
        }                 
    }
    return true;
}

Michael,

I think your code is already good and decent. That should be the best way to achieve your scenario.

- James.

All times are GMT -5. The time now is 5:57 AM.
Previous Next