Hello!
How to get the data from the row meant for addingRow on the server side and not from rowAdding event?
this.WebHierachicalDataGrid1.Behaviors.EditingCore.Behaviors.RowAdding.Row returns null if it's not in the events connected with rowAdding.
Thnaks in advance.
Ok,
this.WebHierachicalDataGrid1.GridView.Behaviors.EditingCore.Behaviors.RowAdding.Row
works for the rootBand. But then while I'm trying to get the cellValue like this -
Infragistics.Web.UI.GridControls.GridRecordItem userName = rowToAdd.Items.FindItemByKey("UserName");
userName's Text property is "", though that cell of add row is not empty and even defaultValueAsString is also set not to "".
Hi Andrey,
It seems that it's not possible to get these values outside of the RowAdding event. However, you could workaround it by placing the values from the new row in hidden fields on the page. Then you should be able to access them on the server. You can get the values from the row to add like this:
var grid = $find("WebHierarchicalDataGrid1");
var rowToAdd = grid.get_gridView().get_behaviors().get_editingCore().get_behaviors().get_rowAdding().get_row();
var cell2Value = rowToAdd.get_cell(1).get_value();
Let me know if you have any questions regarding the matter.
Hi Nikolay,
Thanks for the workaround, I also thought of that. I have one more issue - in UltraWebGrid it was possible to add several validators for the column. How to do that for whdg,wdg? With one validator it works fine, but more?
Hello Andrey,
After some research, using multiple validators with a single column has been determine as a new Product Idea. I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI12100066.
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Hello Nikolay,
thanks for your assistant. I've got one more issue - I don't need to show the checkBox in the header of CheckBox column (it concerns both bound and unbound fields). I would prefer showing an image in the Header. For uwg it was possible with template column of type check box and then adding Image Url property to the header. How to do that with whdg, wdg?
This can be achieved using templates. First, to hide the header checkbox, set HeaderCheckBoxMode="Off". Then create the template with the image you want to appear in the header and set the TemplateId property of the header to match the ID of your template. Here is an example:
<Columns>
<ig:UnboundCheckBoxField HeaderCheckBoxMode="Off" HeaderChecked="False"
Key="UnboundCheckBoxField_0">
<Header Text="" TemplateId="HeaderTemplate" />
</ig:UnboundCheckBoxField>
</Columns>
<Templates>
<ig:ItemTemplate ID="WebDataGrid1Template1" runat="server"
TemplateID="HeaderTemplate">
<Template>
<img src="path/to/your/image.jpg" alt="image" />
</Template>
</ig:ItemTemplate>
</Templates>
Let me know if this helps.
that works beautifully! Thank you. Sorry, just one more question -
If I change the value of the checkBox in the checkBox column (not in the header, just any checkBox in the column) in which clientside event should I commit editing (I do it like this:
var grid = $find("WebDataGrid1");var editing = grid.get_behaviors().get_editingCore();editing.commit();
)
so that in rowUpdating on the server side (which is called because of editing.commit()) I can already see the new value of the checkBox?
I tried to do that in CellValueChanged clientside handler, but then in rowUpdating the value is still the old one
Hi,
I'm posting one more issue link here hoping that someone would see - there I haven't been answered for a week already and that issue is crucial for me. http://es.infragistics.com/community/forums/p/74746/378495.aspx#378495
It turned out that yes... But it concerns more WebDropDown so I posted it here http://es.infragistics.com/community/forums/p/74631/377250.aspx#377250
I'm glad I could help.
Feel free to contact me if you have any other questions.
Thank you, everything works pretty nice!
You should be able to get the updated values from the RowUpdatingEventArgs of RowUpdating event - for example: e.Values["Name"]. It does not matter where you are calling commit() function.