iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Intersoft
Here is how i populated my WebGrid:
Protected Overrides Sub OnLoadComplete(ByVal e As System.EventArgs) MyBase.OnLoadComplete(e) Dim connStr As String connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../../../Data/Mymdb.mdb") Dim conn As New OleDbConnection(connStr) conn.Open() Dim sql As String sql = "SELECT * FROM MyTable" Dim cmd As New OleDbCommand(sql, conn) Dim myDataReader As OleDbDataReader myDataReader = cmd.ExecuteReader() myDataReader.Read() MyGRID.DataSource = myDataReader DataBind() myDataReader.Close() conn.Close() End Sub
And here my Grid:
<ISWebGrid:WebGrid ID="MyGRID" runat="server" Height="500px" UseDefaultStyle="True" Width="100%" DefaultStyleMode="Elegant"> <RootTable DataKeyField="lfdNr"> <Columns> <ISWebGrid:WebGridColumn Caption="XY" DataMember="XY" Name="XY" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Nr." DataMember="lfdNr" Name="lfdNr" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="XYY" DataMember="XYY" Name="XYY" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="XYYY" DataMember="XYYY" Name="XYYY" Width="100px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid>
This works fine but the first row is missing, in every grid (see attachment)
e.g. 156 rows loaded but in my access database are 157 rows.
How could I solve this problem?
Hello,
Please try to bind your database in IntializeDataSource event instead of in OnLoadComplete event.
This events occurs when a datasource needs to be initialized during data binding. Regards,Handy
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname