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 have have WebGrid in a MS Gridview Template.
The InitializeLayout Event fires but other Events like PrepareDataBinding do not occur. If I click on the Grid's "Refresh Grid Data" it loads.Are there any known issues?
I saw someone else asking about the GridView just being on the same page but they got no reply:
http://www.intersoftpt.com/Community/WebGrid/webgrid-Context-menu-not-showing-up/
What do I need to do to make it load automatically?
I also notice that my WebGridColumn that is a WebCombo can not find the WebComboID. It popups "Can't find WebCombo.NET instance with ID ''". If I change the WebComboID to something I know does not exist it actually pops up with that ID and not an empty string ''.
Can embedding actually be done?
Would putting it in a User Control (.ascx) help?
Doug
Hello Doug,
Ok, thank you for guiding me. It seems our line number is a little different.
Please let me re-ensure again about your scenario. You don't want to pass OrderID_TextBox until RowDataBound event and even you used DataBind(), It also doesn't help, correct?. Please let me know if I was mistaken in understanding your requirement.
If my assumption is correct, please replace it with RebindDataSource() method.e.g OrderDetails_WebGrid.RebindDataSource();
This should work on your scenario.
Regards,Handy
Hi Douglas,
It could not find WeBCombo ID because it is inside Grid View template. You will need to use FindControl() to get an ID control inside GridView template. Btw, I also have PrepareDataBinding issue. I will submit this to our developer teams.
Hi,
It appears to be a Life Cycle issue.
WebGrid needs something before the _GridView_RowDataBound Server Event which sets OrderID_TextBox.Text = "10643"
OrderID_TextBox is a SqlDataSource SelectParameter which is used by the WebGrid
I have provided a simplified example. You will need to change the ConnectionString.
Everything works fine until the OrderID_TextBox attribute Text="10643", Line 79 is removed.
-- The WebGrid must be loaded manually
-- Activating the WebCombo produces "Can't find WebCombo.NET instance with ID ''
I tried putting a OrderDetails_WebGrid.DataBind() in the _GridView_RowDataBound Server Event but that did not help.
Since I am not going to know the OrderID value until _GridView_RowDataBound Server Event, what must I do to provide that value to the WebGrid?
Hi Doug,
Your sample runs fine in here. Also, I don't understand 'OrderID_TextBox.Text = "10643"' part. I could not find something about this part. I think there is something missing in the sample you sent to me. Where is DataBound event in server side? There is nothing server code you sent.
Did you try running the sample after removing OrderID_TextBox attribute Text="10643"?
The OrderID_TextBox attributes start on Line 79. The actual attribute, Text="10643", is Line 82.
Remove Line 82 and then run the sample and observe the following:
Maybe you don't realize it, everything is in the same file, Server-Side Code included. The Sample is not using a Code Behind File.
In the sample I provided, Lines 16 - 37 is Server Code.
Line 30 is 'OrderID_TextBox.Text = "10643", inside the _GridView_RowDataBound Server Event, Lines 26 - 34.
After removing Line 82, Line 30 will be too late in providing the Value for the WebGrid's SqlDataSouurce SelectParameter to be used in the Initial Page Load. A Subsequent "Refresh Grid Data" now has the Value however there is a problem with the WebCombo.NET instance. Hence, a Life Cycle issue, what comes first in what order.
Since I am not going to know the OrderID value until the _GridView_RowDataBound Server Event, what must I do to have the WebGrid Load on the Initial Page Load and have a valid WebCombo.NET instance?
The RebindDataSource() worked.
Thanks,
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