i already purchage your tool
my question is
1)how to replace igedit_getById('<%=stdFeeWebCurrencyEdit.ClientID%>') in javascript
2)stdFeeWebCurrencyEdit.getValue(); in javascript
3)stdFeeWebCurrencyEdit.setValue(0) in javascript
on
<ig:WebCurrencyEditor ID="enFeeWebCurrencyEdit" runat="server" CssClass="normalText" MinValue="0" Nullable="False" Width="100px" MaxValue="100000"> </ig:WebCurrencyEditor> control on version 15.1
please help width code
thanks.
please also tell me how to replace
enFeeWebCurrencyEdit.setEnabled(true);
in version 15.1
thanks
Hello,
Thank you for contacting Infragistics!
We received your support request concerning converting to v15.1 WebCurrencyEditor, and this case has been assigned to me. I have done an initial review of your case and first to find the control in JavaScript you can do the following:
var curEdit = $find(“<%=WebCurrencyEditor1.ClientID%>”);
To get/set the value you would use get_value and set_value:
http://help.infragistics.com/doc/ASPNET/2015.1/CLR4.0/?page=WebTextEditor~Infragistics.Web.UI.WebNumericEditor~value.html
var value = curEdit.get_value();curEdit.set_value(0);
For enabling you would use set_enabled:
http://help.infragistics.com/doc/ASPNET/2015.1/CLR4.0/?page=WebTextEditor~Infragistics.Web.UI.WebTextEditor~enabled.html
curEdit.set_enabled(true);
You can see the following links for further documentation and samples concerning this control:
http://help.infragistics.com/doc/ASPNET/2015.1/CLR4.0/?page=Web_WebCurrencyEditor.html
http://es.infragistics.com/samples/aspnet/editors/webcurrencyeditor
Please let me know if you have any further questions concerning this matter.
thanks for reply
One more question
how to add new row on
ig:WebDataGrid
please give me code
Are you trying to add the row on the client side or server side? If you are adding it to your server you have to add it to your datasource then bind that datasource to your grid. If you are adding it on the client you can see the following forum threads:
http://es.infragistics.com/community/forums/t/20029.aspx
http://es.infragistics.com/community/forums/t/93139.aspx
http://es.infragistics.com/community/forums/t/91020.aspx
thanks for help
how to add one row ,2 row, 3 row on three time add buttion click
i found error
Uncaught Rows must have unique DataKeys. This key appears more than once:
<ig:WebDataGrid ID="listWebGrid" Width="99%" StyleSetName="Office2007Black" runat="server" AutoGenerateColumns="false" DataKeyFields="MiscFeeId">
<Columns>
<ig:BoundDataField DataFieldName="MiscItem" Key="Description" Header-Text="Rep Name"></ig:BoundDataField><ig:BoundDataField DataFieldName="Fee" Key="Fee" Header-Text="Amount"></ig:BoundDataField>
<ig:BoundDataField DataFieldName="MiscFeeId" Key="MiscFeeId" Hidden="True" Header-Text="Description"></ig:BoundDataField></Columns>
<Behaviors><ig:Sorting SortingMode="Single" Enabled="true"></ig:Sorting><ig:Paging PagerMode="NumericFirstLast" PageSize="10" QuickPages="4" Enabled="true"></ig:Paging><ig:Selection RowSelectType="Multiple" CellClickAction="Row"></ig:Selection><ig:EditingCore BatchUpdating="true"><Behaviors><%-- <ig:RowAdding Enabled="true" ></ig:RowAdding>--%><ig:RowEditing Enabled="true"></ig:RowEditing></Behaviors></ig:EditingCore></Behaviors></ig:WebDataGrid>
<input type="button" onclick="AfterRowInsertEventHandler();" />
------------------
function AfterRowInsertEventHandler() { var theGrid = $find("<%= listWebGrid.ClientID %>"); var rows = theGrid.get_rows(); var rowsLength = theGrid.get_rows().get_length(); // var row = ["IsSelected", "MiscItem", "Fee", "MiscFeeId"]; rows.add({ "IsSelected": "", "MiscItem": "", "Fee": "", "MiscFeeId": document.getElementById("hdnCertNo").value }); document.getElementById("hdnCertNo").value += document.getElementById("hdnCertNo").value + 1; // var lastRow = rows.get_row(rowsLength); // var cell = lastRow.get_cell(1); // rows.add(lastRow); //theGrid.get_rows().add({ "MiscFeeId": "hello" }); // object of columnKey:cellValue
}
Thank you for the update. To add multiple rows at once on the client side you will want to have BatchUpdating off the EditingCore set to true. This will allow you to do multiple updates/adds/deletes at a time. It appears you already have this set to true. As for why you are getting the error it is because the rows you are adding do not have a unique value for the column/cell that is the DataKeyField. Your current DataKeyField is set to “MiscFeeId”, you have to make sure that has a unique value for every cell in that column of the grid otherwise it will continue to throw that error.
thanks for support
How to update add new row value from code behind to database.
Thank you for the update. Did you change the index of the cell/column you are trying to access the item at? From your markup it appears to be the first column or index 0, in the code you set me you are accessing the 4th column or index 3.
hi,
i am usging
CheckBox check = (Checkbox)WebDataGrid1.Rows[0].Items[3].FindControl("Checkbox2");
but value return null
plase help
Thank you for the update. If you have a control in a template and you want the value from that control you have to find the control first. For example:
However since you want a checkbox column I recommend you instead use our bound or unbound checkbox column:
http://help.infragistics.com/doc/ASPNET/2015.1/CLR4.0/?page=WebDataGrid_Columns.html
http://es.infragistics.com/samples/aspnet/data-grid/checkbox-column
http://es.infragistics.com/samples/aspnet/data-grid/unbound-checkbox-column
Concerning adding rows to your database what do you mean it isn’t working for adding two rows? Is it not adding to your database? Or is it not being added to the grid? Either way I recommend you set EnableDataViewState set to false and rebind your grid on postback. Otherwise you can run into issues with the previous data being maintained.
i was not found ig:TemplateDataField <asp:CheckBox ID="CheckBox2" runat="server" ClientIDMode="AutoID" />
value =1 or 0 or true or false.
Please help me .
foreach (GridRecord row in listWebGrid.Rows) {
string itm = row.Items[0].text;
----------------------------
<ig:WebDataGrid ID="listWebGrid" OnRowAdded="listWebGrid_RowAdded" OnRowAdding="listWebGrid_RowAdding" OnRowUpdated="listWebGrid_RowUpdated" OnRowUpdating="listWebGrid_RowUpdating" EnableAjaxViewState="true" EnableDataViewState="true" EnableAjax="true" Width="99%" StyleSetName="Office2007Black" runat="server" AutoGenerateColumns="false"> <Columns> <ig:TemplateDataField Key="chkBox" Width="40px" > <ItemTemplate > <asp:CheckBox ID="CheckBox2" runat="server" ClientIDMode="AutoID" /> </ItemTemplate> </ig:TemplateDataField>
<ig:BoundDataField DataFieldName="MessageDescription" Key="MessageDescription" Header-Text="Message"></ig:BoundDataField> <ig:BoundDataField DataFieldName="NotesMessageId" Key="NotesMessageId" Hidden="true"></ig:BoundDataField> </Columns> <Behaviors> <ig:EditingCore AutoCRUD="false"> <Behaviors> <ig:RowEditing Enabled="true" EnableDialog="true" EditModeActions-EnableOnActive="true" EditModeActions-MouseClick="Double"> <ColumnSettings>
<ig:EditingColumnSetting ReadOnly="true" ColumnKey="chkBox" /> </ColumnSettings> </ig:RowEditing> </Behaviors> </ig:EditingCore> </Behaviors>
</ig:WebDataGrid>
-----------------------
i insert two row to grid and insert to database it is not working in new version