Mar 15, 2010, 6:40 AM
How can i implement FileUploadField inside a GridPanel.
Hi All,
I am using a FileUploadField inside a editable grid. But when i click on the browse button its not opening the file browser window. Please note that if i add the same FIleUploadField control outside the grid then its work fine.
I have IE 7 and mozilla 3.5.8 .
Please help me. I am sending you the code too.
SOURCE CODE
I am using a FileUploadField inside a editable grid. But when i click on the browse button its not opening the file browser window. Please note that if i add the same FIleUploadField control outside the grid then its work fine.
I have IE 7 and mozilla 3.5.8 .
Please help me. I am sending you the code too.
SOURCE CODE
<div style="padding: 2px 0 0 8px !important;">
<ext:Store ID="storeAttachement" runat="server">
<Reader>
<ext:JsonReader ReaderID="ID">
<Fields>
<ext:RecordField Name="ID">
</ext:RecordField>
<ext:RecordField Name="ATTACHMENTNAME">
</ext:RecordField>
<ext:RecordField Name="ATTACHEMENTID">
</ext:RecordField>
<ext:RecordField Name="DESCRIPTION">
</ext:RecordField>
<ext:RecordField Name="FILENAME">
</ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel runat="server" ID="grdAttachement" StoreID="storeAttachement" Border="false"
Width="700" Height="200" Title="Attachemnte Data">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column Header="ID" DataIndex="ID" Width="40px">
</ext:Column>
<ext:Column DataIndex="ATTACHMENTNAME" Header="Attachment Name">
<Editor>
<ext:TextField ID="txtAttachementName" AllowBlank="true" runat="server">
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column DataIndex="ATTACHEMENTID" Header="Attachment ID">
<Editor>
<ext:TextField ID="txtAttachementID" AllowBlank="true" runat="server">
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column DataIndex="DESCRIPTION" Header="Description">
<Editor>
<ext:TextField ID="txtDescription" AllowBlank="true" runat="server">
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column DataIndex="FILENAME" Header="File Name" Width="440px">
<Editor>
<ext:FileUploadField ID="fup1" runat="server" EmptyText="Select File 1" FieldLabel="File 1"
ButtonText="" Icon="Add">
</ext:FileUploadField>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
<ext:FileUploadField ID="FileUploadField1" runat="server" EmptyText="Select File 1" FieldLabel="File 1"
ButtonText="" Icon="Add">
</ext:FileUploadField>
protected void Page_Load(object sender, EventArgs e)
{
if (!Ext.IsAjaxRequest)
{
BindAttachmentDataStore();
}
}
protected void BindAttachmentDataStore()
{
List<object> list = new List<object>();
for (int i = 0; i <= 5; i++)
{
list.Add(new { ID = i.ToString(), ATTACHMENTNAME = "", ATTACHEMENTID = "", DESCRIPTION = "", FILENAME = ""});
}
this.storeAttachement.DataSource = list;
this.storeAttachement.DataBind();
}