iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Latest Development Blogs
Browse By Tag
Using the latest version of webGrid.
I have a page which uses a grid and has code behind to get some values from the selected row:
Dim keyValue As String = WebGrid4.SelectedRowKeyValue x = keyValue name = WebGrid4.RootTable.GetUngrouppedRows().GetRowByKeyValue(keyValue).Cells.GetNamedItem("Name").Text
When running it using ASP .NET Framework 4.0 all is fine and the keyValue returned is the value that I am expecting, so no problem. But if I go to Framework 4.6 and change the <httpRuntime tag in web.config to use the targetFramework=4.6, the SelectedRowKey value (listed above) returns a null value. Removing the targetFramework=46 from <httpRuntime gets the proper value for keyValue.
Any help would be appreciated.
I started my investigation by creating a simple Web Application targeting Framework 4.6. Decided to skip testing Framework 4.0 since the problem only happen when targetFramework is set to 4.6.
A web form, WebForm1.aspx, is added into the application. It has a WebGrid and an ASP.NET Button. The grid is bind to SQLDataSource control and shows Customers data. Initially, the grid is grouped by "Country" column with ascending sort order.
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="500px" Width="100%" DataSourceID="SqlDataSource1">
<ISWebGrid:WebGridGroup ColumnMember="Country" SortOrder="Ascending" GroupMode="Expanded" />
Following code is added into the button click event handler.
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If (WebGrid1.SelectedRowKeyValue <> "" Or IsNothing(WebGrid1.SelectedRowKeyValue)) Then
Dim keyValue As String = WebGrid1.SelectedRowKeyValue
Dim x = keyValue
Dim name = WebGrid1.RootTable.GetUngrouppedRows().GetRowByKeyValue(keyValue).Cells.GetNamedItem("CompanyName").Text
Button1.Text = name
Following steps are performed in order to test the reported problem:
Everything work as expected and I was unable to replicate the problem.
I enclose my simple sample as attachment. Please have my sample evaluated on your end and feel free to let me know if you find anything that I might miss during my attempt in order to reproduce the problem.
Glad to hear the good news.
Should you need further assistance or run into any problems regarding our controls, feel free to contact us through the live chat service or post it into our community. We would be happy to assist you again.
Forgot your password | Sign up
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
Already a member? Sign in