I'm using UltraWebGrid on a web page. What I'm trying to do is, implement client-side paging. For this LoadOnDemand must be set to XML and InitializeDataSource event must be there. When I tried this in VB.NET it worked. But in C# I can't find InitializeDataSource event in property window. Writing this event in <igtbl:UltraWebGrid> tag in the ASPX file throws a compiler error.
Any thoughts? Quick response will be much appreciated.
Yes , it is working now.
Thanks a lot
Shital
Convert event handler from private to protected
Ex.
private void PatientDataGrid_InitializeDataSource to
protected void PatientDataGrid_InitializeDataSource
Let me know if solves the issue.
I am just trying to load data from two tables.
This is my grid'd defination
<igtbl:UltraWebGrid ID="PatientDataGrid" runat="server" Height="300px" Width="100%" oninitializelayout="PatientDataGrid_InitializeLayout" oninitializedatasource="PatientDataGrid_InitializeDataSource" style="font-family: Arial; font-size: x-small" ondblclick="RowDbClick" Browser="Xml" EnableViewState="False" >
<DisplayLayout AllowColSizingDefault="Free" AllowColumnMovingDefault="OnServer" AllowDeleteDefault="Yes" AllowSortingDefault="OnClient" AllowUpdateDefault="Yes" BorderCollapseDefault="Separate" HeaderClickActionDefault="SortMulti" Name="UltraWebGrid1" RowHeightDefault="20px" RowSelectorsDefault="No" SelectTypeRowDefault="Single" StationaryMargins="Header" StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed" Version="4.00" ViewType="Hierarchical" CellClickActionDefault="RowSelect" LoadOnDemand="Xml"> <ClientSideEvents AfterSelectChangeHandler="GridRowSel" ClickCellButtonHandler="PatientDataGrid_ClickCellButtonHandler" InitializeLayoutHandler="PatientDataGrid_InitializeLayoutHandler" AfterCellUpdateHandler="PatientDataGrid_AfterCellUpdateHandler" />
And on server side added this code
private void PatientDataGrid_InitializeDataSource(object sender, Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs e) { this.PatientDataGrid.DataSource = NewGetData(); }
thanks
shital
Could it be possible for you to create a small sample and upload it here? It will help to identify the issue quickly.
Thanks for reply.
I am getting following error
Compiler Error Message: CS1061: 'ASP.patientbrowser_aspx' does not contain a definition for 'PatientDataGrid_InitializeDataSource' and no extension method 'PatientDataGrid_InitializeDataSource' accepting a first argument of type 'ASP.patientbrowser_aspx' could be found (are you missing a using directive or an assembly reference?)