We are using Net Advantage 2011.2. We have a button click event where we pull webhierarchical grid data into it to save it based on functionality. However we are not getting webhierarchical grid data as expected. We are binding data from codebehind.
protected Sub btn_clickEvent(ByVal Sender as Object, ByVal e as EventArgs) handles btn.ClickEvent
Dim testGrid as Infragistics.Web.UI.GridControls.WebHeirarchicalGrid
testgrid = Me.GridFromUI
End Sub
In the above example we are not getting GridFromUI grid values. Please provide us a way to use data from Grid on a button click event
Hello Avinash,
Thank you for contacting us.
The code seems correct. Are you sure you perform data bind on page load? Can you send me a working sample of your webdatagrid so I could further investigate?
Also, please note that the version you are using is retired several years ago and it is currently not supported. The product lifecycle is stated in the following page:www.infragistics.com/help/product-lifecycle.
Please let me know if I could be of further assistance.
Hi Tihomir iliev,
Thanks for your response,
I performed data bind on page load. I am adding a sample code in C#. Kindly go through it. In the attached code we are getting row count (Don't know whether its correct or not) but for column count we are getting 0. We want to get those column and their respective values.
Hi,
That sample was build using V11.2, However we are using v15.2 for now. I tried adding perform function to button click
<asp:button id="save" runat="server" on click="test" onClientClick="performUpdate">
<script>
function performUpdate(sender, event) { ig_controls.MainContent_g1.get_gridView().get_behaviors().get_editingCore().commit() event.preventDefault();}
</script>
In real time we are using VB.net and perform update function on client click is not working.
From my understanding on rowUpdating method we will get new values and we have to change values in dataset manually.Once row updating is complete it will move to button click event. Please guide me if my understanding it is not correct.
Hello,
Did you check my sample? From what I see in your code you did not declare onClientClick property correctly. Please take a look at my sample to see how it should be done. If you need further information regarding this, here is an article - https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.onclientclick(v=vs.110).aspx .
I am looking forward to hearing from you.
HI,Thank you i didnt declare client click correctly in above code. I have attached screenshot and the respective error. Please go through it.
In one of my previous posts I have attached a working solution based on your solution. Did you check it? You have not passed the event object to the function. I am attaching a screenshot of what you are missing.
Please let me know if you need further assistance.
Iam having the same issue. So i downloaded above attached files and started debugging it. i observed that iam receiving an error at event.preventDefault(). From my understandoing event.PreventDefault() is related to Jquery and i didnt find any jquery library in above attached solution. So please help me with below qeustions.
1. Do we have to add jquery to make solution working or is it available internally.
2. Do we have to update datasource manually in RowUpating event so that we can pull it whenever we want or is it automatically updating data source.(Auto-crud is in default state)
3. I am hitting Input string error after executing performUpdate function and observed that code is correct. is it occuring due to any mis representaion of infragistics controls or data source
Please let me know if you need more information
Hi Avinash Katti,
Thank you for your update.
It still works on my side. Could you send me a working sample demonstrating this behavior?
I am looking forward to your sample.
I have passed event into function. I didn't changed any code which was attached earlier. I am adding screenshot of the issue and code. Please go through it. Input string error issue is occuring in the same sample.
For the sample attached how can we configure it to update the dataset. Do we have to do it manually or configuring it on some process (Please note that parent band is updating as expected, only child band is not updating).
1. You do not need jQuery to call event.preventDefault(). Please take a look here - http://www.w3schools.com/jsref/event_preventdefault.asp. As I mentioned, your issue is that you do not pass the event object to the function.
2. WebDataGrid attempts to automatically persist changes using the mechanism of the underlying data source. This means that if the data source control does not support CRUD operations, you must handle these operations manually to provide such functionality. Check this link for information regarding different data sources - http://help.infragistics.com/Help/Doc/ASPNET/2011.2/CLR4.0/html/WebDataGrid_Supported_Data_Sources.html.
3. Please provide a sample demonstrating this behavior.
Please let me know if you need anything else.