Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a aspx grid and in that grid there is a one column that is image that have DataItemTemplate and EditItemTemplete and DataItemTemplate contain image control and it is bind when the row is created and EditItemTemplate have the AspxUploadControl.
When i am updating a grid i want a UploadControl file name value so plz help me as soon as possible.....
Posted
Comments
Mario Majčica 29-Oct-12 6:24am    
What have you tried till now? In order to help, you should share at least the ASPX definition of interested code.
Work - Dedication - Attitude 30-Oct-12 0:46am    
<dx:ASPxGridView ID="grdmarket" runat="server" AutoGenerateColumns="False"
KeyFieldName="pid" onrowdeleting="grdmarket_RowDeleting"
önrowupdating="grdmarket_RowUpdating"
önhtmlrowcreated="grdmarket_HtmlRowCreated">
<columns> <dx:gridviewcommandcolumn visibleindex="0" xmlns:dx="#unknown">
<editbutton visible="True">

<deletebutton visible="True">

<clearfilterbutton visible="True">


<dx:gridviewdatatextcolumn fieldname="pid" visible="false" visibleindex="1" xmlns:dx="#unknown">

<dx:gridviewdatatextcolumn fieldname="marketname" visibleindex="2" caption="Market Name" xmlns:dx="#unknown">

<dx:gridviewdatacomboboxcolumn fieldname="country" visibleindex="3" caption="Country" xmlns:dx="#unknown">

<dx:gridviewdatacomboboxcolumn fieldname="city" visibleindex="4" caption="City" xmlns:dx="#unknown">

<dx:gridviewdatacomboboxcolumn fieldname="state" visibleindex="5" caption="State" xmlns:dx="#unknown">

<dx:gridviewdatatextcolumn fieldname="contactperson" visibleindex="6" caption="Contact Person" xmlns:dx="#unknown">

<dx:gridviewdatatextcolumn fieldname="contactno" visibleindex="7" caption="Contact No." xmlns:dx="#unknown">

<dx:gridviewdatamemocolumn fieldname="address1" visibleindex="8" caption="Address1" xmlns:dx="#unknown">

<dx:gridviewdatamemocolumn fieldname="address2" visibleindex="9" caption="Address2" xmlns:dx="#unknown">

<dx:gridviewdatatextcolumn fieldname="email" visibleindex="10" caption="Email" xmlns:dx="#unknown">

<dx:gridviewdatatextcolumn fieldname="pincode" visibleindex="11" caption="Pincode" xmlns:dx="#unknown">

<dx:gridviewdatatextcolumn visibleindex="12" caption="Image" fieldname="imageurl" xmlns:dx="#unknown">
<dataitemtemplate>
<dx:ASPxImage ID="txtimage" runat="server">

<edititemtemplate>
<dx:ASPxUploadControl ID="txtimage" runat="server">



<settings showfilterrow="True" showgrouppanel="True">



This is the Aspx page code.. and i want to get the imageurl at runtime when i update the grid it will give the object refrence not found..


if (e.RowType == GridViewRowType.EditForm)
{
// if (e.RowType == GridViewRowType.EditForm) return;
ASPxUploadControl image1 = grdmarket.FindEditRowCellTemplateControl(grdmarket.Columns["imageurl"]
as GridViewDataColumn, "txtimage") as ASPxUploadControl;
if(image1.HasFile)
filename = image1.FileName;
}
when html row created event is genrated this code will run when edit the grid but i am not accissible to get the imageurl

1 solution

I just think, looking for steps about a 3rd party control (here DevExpress Forum) would be more useful.
Look here: DevExpress: Online demos[^]

If needed, try to look here too:
DevExpress: Support Forum[^]
DevExpress documentation[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900