or


Hi,
We use 2 grid (not connected) on one page. One grid is in Edit Mode the other shows a attachment
Anyone any Idea ?
The code I use for downloading the attachment :
If e.CommandName = RadGrid.DownloadAttachmentCommandName Then e.Canceled = True Dim args As GridDownloadAttachmentCommandEventArgs = TryCast(e, GridDownloadAttachmentCommandEventArgs) Dim fileName As String = args.FileName 'Dim column As String = args.CommandSource Dim strcolumn As String = args.AttachmentKeyValues("ColumnUniqueName") Dim strConnectionString As String = DotNetNuke.Data.SqlDataProvider.Instance.ConnectionString Dim conn As New SqlConnection(strConnectionString) 'Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("TelerikConnectionString").ConnectionString) Dim strTable As String = CType(Settings("TableName"), String) Dim strUniqueId As String = CType(Settings("UniqueId"), String) Dim strid As String = (DirectCast(e.Item, GridDataItem)).GetDataKeyValue(strUniqueId).ToString() Dim comm As New SqlCommand("SELECT [" + strcolumn + "] FROM [" + strTable + "] WHERE [" + strUniqueId + "]=" + strid, conn) 'comm.Parameters.Add(New SqlParameter("@ID", attachmentId)) Dim adapter As New SqlDataAdapter(comm) Dim data As New DataSet() adapter.Fill(data) Dim binaryData As Byte() = DirectCast(data.Tables(0).Rows(0)(strcolumn), Byte()) Response.Clear() 'Response.ClearHeaders() '*** Response.Cache.SetCacheability(HttpCacheability.Private) '*** Response.ContentType = "application/octet-stream" Response.AddHeader("content-disposition", "attachment; filename=" + fileName) Response.BinaryWrite(binaryData) Response.[End]() End If
I am using Asp.net Ajax telerik controls and VS 2010. I need to draw something like attached figure in aspx page and when the user clicks it, it needs to display user control details. I am very new to this kind of project. Please give me some input on how to achieve this ( draw rectangle like that and enter text in asp.net) using telerik controls.
Thanks!


<asp:Label ID="Label1" AssociatedControlID="ZipOrCityState" runat="server">Zip or City, State</asp:Label><telerik:RadTextBox ID="RadTextBox1" runat="server" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" TabIndex="1" EnableSingleInputRendering="true" Width="217px"></telerik:RadTextBox><asp:Label ID="Label2" AssociatedControlID="CompanyList" runat="server">Company</asp:Label><telerik:RadComboBox ID="RadComboBox1" runat="server" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" TabIndex="2" EnableSingleInputRendering="true" Width="217px" DataSourceID="CompanyDataSource" AllowCustomText="false" DataTextField="CompanyName" DataValueField="CompanyId" EnableViewState="true"></telerik:RadComboBox><asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCompanyComboList" TypeName="Web.Offices.OfficeManager"></asp:ObjectDataSource><div class="officeSearchResultsButton"> <telerik:RadButton ID="RadButton1" runat="server" Text="Search" CssClass="blueButton" OnClick="Search_Click" TabIndex="25" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" ValidationGroup="ValidOfficeSearch"> </telerik:RadButton></div>#region EVENTHANDLER - Page_Load protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { //Populate controls from values passed from calling page in the query string ZipOrCityState.Text = Request.QueryString["zipOrCityState"]; CompanyList.SelectedValue = Request.QueryString["companyId"]; //Bind Offices Grid OfficeGrid.DataBind(); } } catch (Exception ex) { throw ex; } } #endregion #region EVENTHANDLER - Search_Click protected void Search_Click(object sender, EventArgs e) { try { //Check if submitted data is valid if (Page.IsValid) { //Bind Offices Grid OfficeGrid.DataBind(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); throw ex; } } #endregion