Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
282 views
Hi All, 
I am using the below code to retrieve an varbinary image from a database. Is it possible to display the image into an image editor.
Any idea or sample code 
SqlConnection conn = new SqlConnection(strconnection);
  SqlDataAdapter sda = new SqlDataAdapter("select Front_Image,Rear_Image from Transactions", conn);
  DataTable dt = new DataTable();
  sda.Fill(dt);
 
  foreach (DataRow row in dt.Rows)
      {
 
      //Get the byte array from image file
      byte[] imgBytes = (byte[])row["Front_Image"];
 
      //If you want convert to a bitmap file
      TypeConverter tc = TypeDescriptor.GetConverter(typeof(Bitmap));
      Bitmap MyBitmap = (Bitmap)tc.ConvertFrom(imgBytes);
 
 
      string imgString = Convert.ToBase64String(imgBytes);
      //Set the source with data:image/bmp
      Front_img.Src = String.Format("data:image/Bmp;base64,{0}\"", imgString);


Thanks
Vessy
Telerik team
 answered on 12 Jan 2015
8 answers
195 views
Hello,

I have a problem with the progress area of upload control . when i select file and click on any control that causes postback the upload process starts and progress area appears, but actually no file is uploaded   which is not convenient. I need only to show the progress area and begin upload process when i need so. please help me.
Thanks
Nencho
Telerik team
 answered on 12 Jan 2015
1 answer
115 views
Hi, i have a problem, i want to hide a gridtemplatecolumn at selected an option of DropDownList but i cant do it.
My dropdownlist isn´t in the RaidGrid.

This is my dropdownlist:

<asp:Label ID="Label5" runat="server" CssClass="clbl04" Text="Estatus :"></asp:Label>
                                                        <asp:DropDownList ID="ddst" runat="server" Font-Names="Tahoma" Font-Size="8pt" AutoPostBack="false"></asp:DropDownList>

and this is my gridtemplatecolumn:

<radG:GridTemplateColumn HeaderText="Certification Date" UniqueName="TemplateColumn">


Viktor Tachev
Telerik team
 answered on 12 Jan 2015
6 answers
833 views

Hi Its Shrawan fro a:m web,

In my last post i have asked u about rad ajax problem in mozilla 3.0 in radControls for asp.net not asp.net ajax,
Thankyou very much for ur reply
anyway i have installed radcontrols fro asp.net ajax and i get rid of that perticulat input string error,

But now when i am using radajaxloadingpanel controls it asked me to place radscript manager and http handler in web.config I have placed that, But now when i have clicked on any of the buttons in whichever forms i used this rascript manager i am getting following exception as an alert and i am not able continue my navigation beyond this

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

<!DOCTYPE html PUB'.

u can see tat error in http://globalcarbon.amwebhost.net/index.aspx goto anyof calculators on ur right side like quick,house,car etc and try to hit the button and then go to shopping_cart.aspx click on next button u will get the error instance there also,

Can u please help me how should i overcome this error,

Thak you

Hope i will get a quich solution from u, awaiting for that

Sravan@amweb.ie

Maria Ilieva
Telerik team
 answered on 12 Jan 2015
3 answers
212 views
The grid loads fine using my JSON data source but when I click the paging buttons or page numbers it causes a postback of the page rather than firing a client command event as expected. I dont see a disable postback property.

Here are the relevant information. Its a very simple test.

    <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False" GroupPanelPosition="Top" Skin="Office2007" EnableViewState="false">
        <MasterTableView AllowCustomPaging="True" AllowPaging="True" PagerStyle-AlwaysVisible="True" PageSize="10">
            <RowIndicatorColumn Visible="False">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Created="True">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Owner" HeaderText="Owner">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
            <ClientEvents OnDataBound="dataBound" />
            <ClientEvents OnCommand="RadGrid1_Command" />
        </ClientSettings>
    </telerik:RadGrid>

Thanks

Brian
Maria Ilieva
Telerik team
 answered on 12 Jan 2015
1 answer
110 views
Hi,
I have a combo and a menu on my masterpage. On combo selectedindexchanged I populate the menu.
Each menu open a content page.
When I click on a menu I lost the combo selection.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
         <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="ChooseProjectDdl">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="ChooseProjectDdl" />
                     <telerik:AjaxUpdatedControl ControlID="RadMenu1"  />
                     <telerik:AjaxUpdatedControl ControlID="BreadCrumbSiteMap"  />
                 </UpdatedControls>
             </telerik:AjaxSetting>
 
             <telerik:AjaxSetting AjaxControlID="RadMenu1">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="RadMenu1"  />
                     <telerik:AjaxUpdatedControl ControlID="ChooseProjectDdl" />
                     <telerik:AjaxUpdatedControl ControlID="BreadCrumbSiteMap"  />
                     <telerik:AjaxUpdatedControl ControlID="ContentPlaceHolder1"  />
                 </UpdatedControls>
             </telerik:AjaxSetting>
         </AjaxSettings>
 
     </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxMainLoadingPanel" runat="server" Skin="Default" />
 
 
     <div>
 
         <header>              
             <div class="projectChooser">
                 <telerik:RadComboBox ID="ChooseProjectDdl" runat="server" Width="250" Height="150" on
                     EmptyMessage="Select a Project" EnableLoadOnDemand="true"
                     OnSelectedIndexChanged="ChooseProjectDdl_SelectedIndexChanged" AutoPostBack="true"
                     Label="Project:">
                     <WebServiceSettings Method="GetUserProjects" Path="ProjectsWebService.asmx" />
                 </telerik:RadComboBox>            
             </div>
         </header>
                    
 
             <div class="demo-container size-medium no-bg">
                 <div class="demo-content">
                     <telerik:RadMenu ID="RadMenu1"
                         runat="server"
                         EnableRoundedCorners="true"
                         EnableShadows="true"
                         EnableTextHTMLEncoding="true"
                         Skin="Default">
                     </telerik:RadMenu>
                     <br />
                     <div class="breadcrumb">
                         <telerik:RadSiteMap ID="BreadCrumbSiteMap" runat="server" DataTextField="Text" DataNavigateUrlField="NavigateUrl" Skin="Silk">
                             <DefaultLevelSettings ListLayout-RepeatDirection="Horizontal" SeparatorText="/" Layout="Flow" />
                         </telerik:RadSiteMap>
                         <h3>
                             <asp:Literal runat="server" ID="PageTitleLiteral" />
                         </h3>
                     </div>
                 </div>
             </div>
 
         
             <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
             </asp:ContentPlaceHolder>
        
     </div>

I tried to save the value on a session and force the selectedvalue on the MasterPage on Load event but it doesn't work
if (!Page.IsPostBack)
            {
                if (Session["ActiveProject"] != null && GlobalClientInfo.LoggedUser != null)
                {
                    ProjectEntity pjt = (ProjectEntity)Session["ActiveProject"];
                    m_ProjectId = pjt.Id;
                    ChooseProjectDdl.SelectedValue = m_ProjectId.ToString();
                }
            }

What do I miss?
Ivan Danchev
Telerik team
 answered on 12 Jan 2015
1 answer
98 views
Hi

I have successfully bound a large dataset to my org chart and displaying the first 3 levels but the chart if bursting out the right hand side of the page. I'm ok with this but would like the top node to appear in the center of the page effectively bursting out the sides of the page equally.

<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="scriptManager1" runat="server"/>
    <div>    
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" ClientEvents-OnResponseEnd="OnResponseEnd">
            <div class="demo-container no-bg">
                <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="RadAjaxLoadingPanel1" >
                    <asp:HiddenField runat="server" ID="SessionID" />
                    <telerik:RadOrgChart ID="RadOrgChart1" runat="server" Skin="Default" RenderMode="Lightweight" LoadOnDemand="NodesAndGroups" DataCollapsedField="Collapsed" GroupColumnCount="3" EnableDrillDown="true" EnableDragAndDrop="true" MaxDataBindDepth="3" DisableDefaultImage="true" AllowGroupItemDragging="true" EnableGroupCollapsing="true" />
                </telerik:RadAjaxPanel>
            </div>
        </telerik:RadAjaxPanel>
    </div>
    </form>
</body>

Thanks
Boyan Dimitrov
Telerik team
 answered on 12 Jan 2015
1 answer
54 views
Hi..

I've tracked a problem down which I initially thought was related to Tabstrip but seems it is actually setting the grid edit mode in code whereby including the lines of code below prevent a select box working in IE 11 on my page. If I comment the lines of code out the select box then works fine. This issue doesn't appear on firefox/chrome though only IE.

                 RadGrid1.MasterTableView.EditMode = GridEditMode.Batch;
                RadGrid1.MasterTableView.BatchEditingSettings.EditType = GridBatchEditingType.Cell;

The procedure simply displays a hidden column and changes the editmode. I'm wondering if the same thing can be done client side? Is there a way in javascript to achieve result?

    if (RadGrid1.MasterTableView.GetColumn("Map").Display != true)
            {
                RadGrid1.MasterTableView.EditMode = GridEditMode.Batch;
                RadGrid1.MasterTableView.BatchEditingSettings.EditType = GridBatchEditingType.Cell;
                RadGrid1.MasterTableView.GetColumn("Map").Display = true;
                foreach (GridColumn col in RadGrid1.MasterTableView.Columns)
                    if (col.UniqueName == "col1" || col.UniqueName == "col2" || col.UniqueName == "col3")
                    {
                        GridBoundColumn boundColumn = col as GridBoundColumn;
                        boundColumn.ReadOnly = true;
                    }                  
             }
               
           else
            {
               RadGrid1.MasterTableView.EditMode = GridEditMode.EditForms;                
               RadGrid1.MasterTableView.GetColumn("Map").Display = false;
               foreach (GridColumn col in RadGrid1.MasterTableView.Columns)
                   if (col.UniqueName == "col1" || col.UniqueName == "col2" || col.UniqueName == "col3")
                   {
                       GridBoundColumn boundColumn = col as GridBoundColumn;
                       boundColumn.ReadOnly = false;
                   }
            }
Angel Petrov
Telerik team
 answered on 12 Jan 2015
3 answers
140 views
Hi,

I  am trying to print a view that has telerik grid, I want all rows to appear in the printed output, so I gave the grid height 2500 px, the grid show all rows, but when i print the page, the first page has blank area after columns header

please find attached a sample of the print output in PDF.

please tell me how to fix it.
Pavlina
Telerik team
 answered on 12 Jan 2015
1 answer
123 views
We have a grid that has a GridDateTimeColumn with the globalization culture info settings set to "en-GB".  If I enter the date "30/12/2014" and save it to the database, the column maintains the correct formatting of "dd/MM/YYYY" after the save postback completes.  However, if I enter "06/01/2015" and click save, the date format changes to "01/06/2015" after the postback.  The date is saved correctly in the db as "12/30/2014" and "01/06/2015".

I'm at a loss as to what the problem could be.  Checking CultureInfo and CultureUIInfo shows the following:
CultureInfo = "en-GB"
CultureUIInfo = "en-US"

Internet Explorer's "Language Preference" has only "English (United Kingdom) [en-GB]" in its list.

Even when I set CultureUIInfo to "en-GB" manually in the page_load, the problem persists.

Please help,

Thank you,
James
Angel Petrov
Telerik team
 answered on 12 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?