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://ko.infragistics.com/samples/aspnet/editors/webcurrencyeditor
Please let me know if you have any further questions concerning this matter.
what is different between 15.1.20151.2278 and 15.1.20151.2123 for WebDataGrid
actually i implemented add multiple row and insert to db. i successfully inserted in 15.1.20151.2123 version
but it is not working on 15.1.20151.2278 version
my code is
<ig:WebDataGrid ID="uwgPayments" ShowFooter="true" ViewStateMode="Enabled" EnableViewState="true" OnRowAdded="uwgPayments_RowAdded" OnRowAdding="uwgPayments_RowAdding" OnRowUpdated="uwgPayments_RowUpdated" OnRowUpdating="uwgPayments_RowUpdating" EnableAjaxViewState="true" EnableDataViewState="true" EnableAjax="true" Width="99%" DataKeyFields="PaymentId" StyleSetName="Office2007Black" runat="server" AutoGenerateColumns="false"> <Columns> <ig:BoundDataField DataFieldName="PaymentId" Key="PaymentId" Hidden="True" Header-Text="Pay ID"></ig:BoundDataField> <ig:BoundDataField DataFieldName="CertId" Key="CertId" Hidden="True" Header-Text="Cert No"></ig:BoundDataField> <ig:BoundDataField DataFieldName="PaymentAmt" Key="PaymentAmt" DataFormatString="{0:c}" Header-Text="Amount"></ig:BoundDataField> <ig:BoundDataField DataFieldName="PaymentType" Key="PaymentType" Header-Text="Payment Type" Width="120px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="PaymentDate" Key="PaymentDate" DataFormatString="{0:MM/dd/yyyy HH:mm}" Width="120px" DataType="System.DateTime" Header-Text="Date"></ig:BoundDataField> <ig:BoundDataField DataFieldName="StandardFee" Key="StandardFee" DataFormatString="{0:c}" Header-Text="Std Fee"></ig:BoundDataField> <ig:BoundDataField DataFieldName="ChildFee" Key="ChildFee" DataFormatString="{0:c}" Header-Text="Child Fee"></ig:BoundDataField> <ig:BoundDataField DataFieldName="ExtraNightFee" Key="ExtraNightFee" DataFormatString="{0:c}" Header-Text="ExN Fee"></ig:BoundDataField> <ig:BoundDataField DataFieldName="MiscFee" Key="MiscFee" DataFormatString="{0:c}" Header-Text="Misc. Fee"></ig:BoundDataField> <ig:BoundDataField DataFieldName="RescheduleFee" Key="RescheduleFee" DataFormatString="{0:c}" Header-Text="Res. Fee"></ig:BoundDataField> <ig:BoundDataField DataFieldName="RenewalFee" Key="RenewalFee" DataFormatString="{0:c}" Header-Text="Ren. Fee"></ig:BoundDataField> <ig:BoundDataField DataFieldName="AssocTransId" Key="AssocTransId" Width="90px" Header-Text="Assoc Trans Id"></ig:BoundDataField> </Columns> <Behaviors> <ig:Activation Enabled="true"></ig:Activation> <ig:Sorting></ig:Sorting> <%-- <ig:Paging PagerMode="NumericFirstLast" PageSize="10" QuickPages="4" Enabled="true"> </ig:Paging>--%> <ig:Selection RowSelectType="Single" CellClickAction="Row"></ig:Selection> <ig:EditingCore AutoCRUD="false" > <Behaviors> <%-- <ig:RowDeleting Enabled="true" ShowDeleteButton="true"></ig:RowDeleting>--%> <%-- <ig:RowEditing Enabled="true" RowEditingClientEvents-ExitingEditMode="WebDataGrid1_RowEdit_ExitingEditMode" EnableDialog="false" EditModeActions-EnableOnActive="true" EditModeActions-MouseClick="Single"> </ig:RowEditing>--%>
<ig:CellEditing Enabled="true" EditModeActions-EnableOnActive="true" EditModeActions-MouseClick="Single"> <ColumnSettings > <ig:EditingColumnSetting ColumnKey="PaymentType" EditorID="PaymentTypeProvider" /> <ig:EditingColumnSetting ColumnKey="PaymentDate" EditorID="PaymentDateProvider" /> <ig:EditingColumnSetting ColumnKey="PaymentAmt" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="StandardFee" EditorID="StandardFeeEditorProvider" /> <ig:EditingColumnSetting ColumnKey="ChildFee" EditorID="ChildFeeEditorProvider" /> <ig:EditingColumnSetting ColumnKey="ExtraNightFee" EditorID="ExtraNightFeeEditorProvider" /> <ig:EditingColumnSetting ColumnKey="MiscFee" EditorID="MiscFeeEditorProvider" /> <ig:EditingColumnSetting ColumnKey="RescheduleFee" EditorID="RescheduleFeeEditorProvider" /> <ig:EditingColumnSetting ColumnKey="RenewalFee" EditorID="RenewalFeeEditorProvider" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> <EditorProviders> <ig:DateTimeEditorProvider ID="PaymentDateProvider"> <EditorControl ClientIDMode="Predictable" runat="server" DisplayModeFormat="MM/dd/yyyy HH:mm" EditModeFormat="MM/dd/yyyy HH:mm"> <Buttons SpinButtonsDisplay="OnRight"></Buttons> </EditorControl> </ig:DateTimeEditorProvider> <ig:DropDownProvider ID="PaymentTypeProvider"> <EditorControl ID="EditorControl2" runat="server" DisplayMode="DropDownList" AutoPostBack="false"> <Items>
<ig:DropDownItem Value="Mail In Check" Text="Mail In Check"></ig:DropDownItem> <ig:DropDownItem Value="Checks By Phone" Text="Checks By Phone"></ig:DropDownItem> <ig:DropDownItem Value="Credit Card" Text="Credit Card"></ig:DropDownItem> <ig:DropDownItem Value="Rebate Check" Text="Rebate Check"></ig:DropDownItem>
</Items> </EditorControl> </ig:DropDownProvider> <ig:CurrencyEditorProvider ID="StandardFeeEditorProvider" EditorControl-ClientEvents-Blur="CalculateRowTotal"> </ig:CurrencyEditorProvider> <ig:CurrencyEditorProvider ID="ChildFeeEditorProvider" EditorControl-ClientEvents-Blur="CalculateRowTotal"> </ig:CurrencyEditorProvider> <ig:CurrencyEditorProvider ID="ExtraNightFeeEditorProvider" EditorControl-ClientEvents-Blur="CalculateRowTotal"> </ig:CurrencyEditorProvider> <ig:CurrencyEditorProvider ID="MiscFeeEditorProvider" EditorControl-ClientEvents-Blur="CalculateRowTotal" > </ig:CurrencyEditorProvider> <ig:CurrencyEditorProvider ID="RescheduleFeeEditorProvider" EditorControl-ClientEvents-Blur="CalculateRowTotal"> </ig:CurrencyEditorProvider> <ig:CurrencyEditorProvider ID="RenewalFeeEditorProvider" EditorControl-ClientEvents-Blur="CalculateRowTotal"> </ig:CurrencyEditorProvider> </EditorProviders> </ig:WebDataGrid>
function AfterRowInsertEventHandler() { var grid = $find(uwgPayments); var rows = grid.get_rows(); var rowsLength = grid.get_rows().get_length(); var row = new Array("0", "0"); rows.add(row); }
---
protected void uwgPayments_RowAdding(object sender, RowAddingEventArgs e) { if (ViewState["i"] == null) ViewState["i"] = i; else { i = (int)ViewState["i"] + 1; ViewState["i"] = i; } DataRow row = ((DataTable)ViewState["dtPayments"]).NewRow(); row.SetField<Int32>("PaymentId", -i); row.SetField<Int32>("CertId", certId); row.SetField<string>("PaymentAmt", "0.00");
row.SetField<Int32>("PaymentTypeId", 0); row.SetField<DateTime>("PaymentDate", DateTime.Now); row.SetField<string>("StandardFee", "0.00");
row.SetField<string>("ChildFee", "0"); row.SetField<string>("ExtraNightFee", "0.00"); row.SetField<string>("MiscFee", "0.00");
row.SetField<string>("RescheduleFee", "0.00"); row.SetField<string>("RenewalFee", "0.00"); row.SetField<string>("AssocTransId", "");
((DataTable)ViewState["dtPayments"]).Rows.Add(row); RebindGrid(); } public void RebindGrid() { uwgPayments.DataSource = ((DataTable)ViewState["dtPayments"]); uwgPayments.DataBind(); } protected void uwgPayments_RowUpdated(object sender, RowUpdatedEventArgs e) { e.ExceptionHandled = true; } protected void uwgPayments_RowUpdating(object sender, RowUpdatingEventArgs e) { DataTable dt = (DataTable)ViewState["dtPayments"]; int Index = e.RowID.Index;
int paymentTypeId = 0; if (e.Values["PaymentType"].ToString() == "Mail In Check") { paymentTypeId = 1; } else if (e.Values["PaymentType"].ToString() == "Checks By Phone") { paymentTypeId = 2; } else if (e.Values["PaymentType"].ToString() == "Credit Card") { paymentTypeId = 3; }
dt.Rows[Index]["PaymentId"] = e.Values["PaymentId"] == null ? -1 : e.Values["PaymentId"]; dt.Rows[Index]["CertId"] = certId; dt.Rows[Index]["PaymentAmt"] = e.Values["PaymentAmt"]; dt.Rows[Index]["PaymentTypeId"] = paymentTypeId; dt.Rows[Index]["PaymentDate"] = e.Values["PaymentDate"]; dt.Rows[Index]["StandardFee"] = e.Values["StandardFee"]; dt.Rows[Index]["ChildFee"] = e.Values["ChildFee"]; dt.Rows[Index]["ExtraNightFee"] = e.Values["ExtraNightFee"]; dt.Rows[Index]["MiscFee"] = e.Values["MiscFee"]; dt.Rows[Index]["RescheduleFee"] = e.Values["RescheduleFee"]; dt.Rows[Index]["RenewalFee"] = e.Values["RenewalFee"]; dt.Rows[Index]["AssocTransId"] = e.Values["AssocTransId"]; //.. dt.Rows[Index]["PaymentAmt"] = Convert.ToDecimal(e.Values["PaymentAmt"]); // dt.Rows[Index]["PaymentAmt"] = Convert.ToDecimal(e.Values["PaymentAmt"]);
ViewState["dtPayments"] = dt; dsPayments.Tables[0].Rows.Add(new object[] { e.Values["PaymentId"]==null?-1:e.Values["PaymentId"] ,certId ,e.Values["PaymentAmt"] ,paymentTypeId ,e.Values["PaymentDate"] ,e.Values["StandardFee"] ,e.Values["ChildFee"] ,e.Values["ExtraNightFee"] ,e.Values["MiscFee"] ,e.Values["RescheduleFee"] ,e.Values["RenewalFee"] ,e.Values["AssocTransId"] }); }
protected void uwgPayments_RowAdded(object sender, RowAddedEventArgs e) { e.ExceptionHandled = true; }
----------
if (!IsPostBack) { DataSet dsTemp = BLPayment.GetClientPaymentsByCertId(WebProfile.Current.UserId, certId); WebDataGrid uwgPayments = (WebDataGrid)Helper.FindControl(Page, "uwgPayments"); uwgPayments.DataSource = dsTemp; uwgPayments.DataBind(); ViewState["dtPayments"] = dsTemp.Tables[0]; if (dsTemp.Tables[0].Rows.Count > 0) //CertNo already available { hdnCertNo.Value = Helper.GetString(dsTemp.Tables[0].Rows[0], 2); } else { hdnCertNo.Value = BLTraveler.GetClientInfo(certId, WebProfile.Current.UserId).Tables["CertificateInfo"].Rows[0]["CertNo"].ToString(); } Page.Title = "Client Payments - " + hdnCertNo.Value; } else { dsPayments = new DataSet(); dsPayments.DataSetName = "PaymentsDataset"; DataTable dt = dsPayments.Tables.Add("Payment"); dt.Columns.Add("PaymentId"); dt.Columns.Add("CertId"); dt.Columns.Add("PaymentAmt"); dt.Columns.Add("PaymentTypeId"); dt.Columns.Add("PaymentDate"); dt.Columns.Add("StandardFee"); dt.Columns.Add("ChildFee"); dt.Columns.Add("ExtraNightFee"); dt.Columns.Add("MiscFee"); dt.Columns.Add("RescheduleFee"); dt.Columns.Add("RenewalFee"); dt.Columns.Add("AssocTransId"); }
i insert two row to grid and insert to database it is not working in new version
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>
-----------------------
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:
CheckBox check = (Checkbox)WebDataGrid1.Rows[0].Items[3].FindControl("Checkbox2");
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://ko.infragistics.com/samples/aspnet/data-grid/checkbox-column
http://ko.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.
hi,
i am usging
but value return null
plase help
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.