Hi,
I have the Rad grid, which has EditFormSettings . I need to find the to find the Grideditformitem in the item command event. I am not
able to find the controls in GridEditformitem. For me it is coming as null. Any Ides.
Please Help Me!!
Any help will be appreciated..
Thanks,
Chithu
I have the Rad grid, which has EditFormSettings . I need to find the to find the Grideditformitem in the item command event. I am not
able to find the controls in GridEditformitem. For me it is coming as null. Any Ides.
Please Help Me!!
Any help will be appreciated..
Thanks,
Chithu
| <EditFormSettings EditFormType="Template" ColumnNumber="3" CaptionFormatString="Add Manufacturer and Model"> |
| <FormTemplate> |
| <table id="tbl1Select" border="0"> |
| <tr> |
| <td style="border: 0px"> |
| Manufacturer: |
| </td> |
| <td style="border: 0px"> |
| <asp:DropDownList Width="150px" CssClass="cssField" ID="ddlManufacturer" runat="server"> |
| </asp:DropDownList> |
| </td> |
| </tr> |
| <tr> |
| <td style="border: 0px"> |
| Model: |
| </td> |
| <td style="border: 0px"> |
| <asp:TextBox ID="txtModel" CssClass="cssfield" runat="server"></asp:TextBox> |
| </td> |
| </tr> |
| </table> |
| <table> |
| <tr> |
| <td> |
| <asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" |
| CommandName="Cancel"> |
| </asp:LinkButton> |
| <asp:LinkButton ID="btnAdd" Text="Add" runat="server" CausesValidation="False" CommandName="Add"></asp:LinkButton> |
| </td> |
| </tr> |
| </table> |
| </FormTemplate> |
| <EditColumn UniqueName="EditCommandColumn1"> |
| </EditColumn> |
| </EditFormSettings> |
| protected void radAddproducts_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| if (e.CommandName == "Cancel") |
| { |
| e.Canceled = true; |
| radAddproducts.MasterTableView.ClearEditItems(); |
| } |
| if (e.CommandName == "Add") |
| { |
| HiddenField hdnManufacturer; |
| if (e.Item is GridDataItem) |
| { |
| hdnManufacturer = (HiddenField)e.Item.FindControl("hdnmanufacturer"); |
| } |
| if (e.Item is GridEditFormItem) |
| { |
| DropDownList dlManufacturer = (DropDownList)e.Item.FindControl("ddlManufacturer"); |
| } |
| } |
| } |