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
I haven't tested following solution further, but you can give it a try. It adds an AutoIncrement column to the DataTable.
Snippet code of OnInitializeDataSource event handler:
protected void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { OleDbCommand selectCommand = new OleDbCommand(); selectCommand.Connection = con; selectCommand.CommandText = "SELECT * FROM Customers"; OleDbDataAdapter da = new OleDbDataAdapter(); da.SelectCommand = selectCommand; DataTable dt = new DataTable(); dt.Columns.Add("RowNumber", typeof(int)); dt.Columns[0].AutoIncrement = true; dt.Columns[0].AutoIncrementSeed = 1; dt.Columns[0].AutoIncrementStep = 1; da.Fill(dt); e.DataSource = dt; }
WebGrid's column definition:
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="250px" UseDefaultStyle="True" Width="500px" RenderingMode="HTML5" OnInitializeDataSource="WebGrid1_InitializeDataSource"> <RootTable DataKeyField="CustomerID"> <Columns> <ISWebGrid:WebGridColumn Caption="Row Number" DataMember="RowNumber" Name="Row Number" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="CustomerID" DataMember="CustomerID" Name="CustomerID" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="CompanyName" DataMember="CompanyName" Name="CompanyName" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ContactName" DataMember="ContactName" Name="ContactName" Width="100px"> </ISWebGrid:WebGridColumn> ... </Columns> </RootTable> </ISWebGrid:WebGrid>
The result is:
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