Hello All,
I am recently working on a problem where i need to create an area for customer to entering employees information, to start off there will be no information contained within the table. Then using the setup down below and some back end C# i want to populate the GridEditForm that also doesn't want to popup. I have been looking for some information on how to program in the back end or possibly java script, though i don't see this as a client side issue. this as i wish i could use an sql data source but to limit access and security we use web services where i get information in a data set which i want to manipulate then send it only once it has been completed.
There's pretty much no C# back end as of now, just a garbled mess of failed tests
ASP
And for posterity a brief snippet of C# of my data set
C#
I hope someone can suggest possibly a mind blowingly easy way to merge data set and caching of the data with the current structure!
Thanks!
David
I am recently working on a problem where i need to create an area for customer to entering employees information, to start off there will be no information contained within the table. Then using the setup down below and some back end C# i want to populate the GridEditForm that also doesn't want to popup. I have been looking for some information on how to program in the back end or possibly java script, though i don't see this as a client side issue. this as i wish i could use an sql data source but to limit access and security we use web services where i get information in a data set which i want to manipulate then send it only once it has been completed.
There's pretty much no C# back end as of now, just a garbled mess of failed tests
ASP
<telerik:RadGrid ID="grdEmployee" GridLines="Horizontal" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" PageSize="25" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" OnItemUpdated="grdEmployee_ItemUpdated" OnItemDeleted="grdEmployee_ItemDeleted" OnItemInserted="grdEmployee_ItemInserted" OnItemCreated="grdEmployee_ItemCreated" OnEditCommand="grdEmployee_OnEdit" OnNeedDataSource="grdEmployee_OnNeedDataSource"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView Width="100%" CommandItemDisplay="Top" AutoGenerateColumns="False" ShowHeadersWhenNoRecords="true"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editColumn"> <ItemStyle CssClass="btnEdit" /> </telerik:GridEditCommandColumn> <telerik:GridDropDownColumn DataField="Employee" HeaderText="Employee" ListTextField="listEmployeeName" ListValueField="EmployeeName" UniqueName="EmployeeName" ColumnEditorID="grdEmployeeDDLEditor"> </telerik:GridDropDownColumn> <telerik:GridMaskedColumn HeaderText="Last 4 SSN" Mask="####" AllowSorting="false" UniqueName="DetailSSN" ColumnEditorID=""> </telerik:GridMaskedColumn> <telerik:GridDropDownColumn DataField="CraftDescription" HeaderText="Craft" ListTextField="listEmployeeCraft" ListValueField="EmployeeCraft" UniqueName="EmployeeCraft" ColumnEditorID="grdEmployeeDDLEditor"> </telerik:GridDropDownColumn> <telerik:GridDropDownColumn DataField="JobClassDescription" HeaderText="Job Level" ListTextField="listEmployeeLevel" ListValueField="EmployeeLevel" UniqueName="EmployeeLevel" ColumnEditorID="grdEmployeeDDLEditor" EditFormColumnIndex="1"> </telerik:GridDropDownColumn> <telerik:GridNumericColumn DataField="HoursWorked" HeaderText="Hours Worked" UniqueName="EmployeeHoursWorked" NumericType="Number" AllowRounding="false" DecimalDigits="2" ColumnEditorID="grdEmployeeNumericColoumnEditor" EditFormColumnIndex="1"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="RateOfPay" HeaderText="Rate of Pay with Benefits" UniqueName="EmployeeRateOfPay" NumericType="Currency" AllowRounding="false" DecimalDigits="2" ColumnEditorID="grdEmployeeNumericColoumnEditor" EditFormColumnIndex="1"> </telerik:GridNumericColumn> <telerik:GridButtonColumn ConfirmText="Delete this Payroll Entry?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" CssClass="btnEdit" /> </telerik:GridButtonColumn> </Columns> <CommandItemSettings ShowRefreshButton="false" /> <EditFormSettings ColumnNumber="2" CaptionDataField="EmployeeName" CaptionFormatString="Edit Payroll Entry for {0}" InsertCaption="New Payroll Entry"> <FormTableItemStyle Wrap="False"></FormTableItemStyle> <FormCaptionStyle CssClass="grdEditForm"></FormCaptionStyle> <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" /> <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" /> <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> <EditColumn ButtonType="ImageButton" InsertText="Add Entry" UpdateText="Update Entry" UniqueName="EditCommandColumn1" CancelText="Cancel Edit"> </EditColumn> <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle> </EditFormSettings> </MasterTableView> <ClientSettings> <ClientEvents OnRowDblClick="grdEmployee_RowDblClick" /> </ClientSettings> </telerik:RadGrid> <telerik:GridDropDownListColumnEditor ID="grdEmployeeDDLEditor" runat="server" DropDownStyle-Width="110px" /> <telerik:GridNumericColumnEditor ID="grdEmployeeNumericColoumnEditor" runat="server" NumericTextBox-Width="125px" /> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> </telerik:RadWindowManager>And for posterity a brief snippet of C# of my data set
C#
protected void createDummyRow() { employeeDummyRow = new DataSet(); DataTable dummyTable = employeeDummyRow.Tables.Add(); dummyTable.Columns.Add("Employee", typeof(String)); dummyTable.Columns.Add("CraftDescription", typeof(String)); dummyTable.Columns.Add("JobClassDescription", typeof(String)); dummyTable.Columns.Add("HoursWorked", typeof(Decimal)); dummyTable.Columns.Add("RateOfPay", typeof(Decimal)); dummyTable.Rows.Add("","","",1,1); } protected void Page_UnLoad(object sender, EventArgs e) { if (dsEmployees == null) { Session["dsEmployees"] = grdEmployee.DataSource; } else { Session["dsEmployees"] = dsLEAPEmployees; } } public void grdEmployee_OnNeedDataSource(Object sender, EventArgs e) { if (grdEmployee.DataSourceIsAssigned == true) { grdEmployee.DataSource = grdEmployee.DataSource; } else { grdEmployee.DataSource = employeeDummyRow.Tables[0].DefaultView; } }I hope someone can suggest possibly a mind blowingly easy way to merge data set and caching of the data with the current structure!
Thanks!
David