Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
185 views
Dear all,

I'm following this demo : http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
I can simulate this in a working environment. But the database is not updated, only the in memory datatable.

How can I update the real database?  Is there a method that can do or do you have working example that works directly on the SQLDatasource? 

Please help!

Koen

Elliott
Top achievements
Rank 2
 answered on 18 Apr 2012
1 answer
154 views
Hi ,
My page has the following feature.
when clicked on any grid on page A,it will take few values in form of query string and fetch records on Page B based one the search criteria in the query string.
Problem is I get the error during the dataBind of page load of Page B.

 

Here is my code of PAGE B
  
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
 gvSearchResults.EmptyDataText =  " ";
gvSearchResults.Columns[3].Visible = false;
gvSearchResults.Columns[4].Visible = false;
gvSearchResults.DataSource = null;
gvSearchResults.DataBind();
/** going to assume that the only mode passing in is search */
if (Request["mode"] != null)
{
if (Request[SearchConstants.PARM_BIZDT] != null)
{
string strDt = Request[SearchConstants.PARM_BIZDT];
try 
{
DateTime dt =
DateTime.ParseExact(strDt, SearchConstants.PARM_BIZDT_FORMAT, DateTimeFormatInfo.InvariantInfo);
StartDT.SelectedDate = dt;
EndDT.SelectedDate = dt;
}
catch (Exception ex)
{
log.Error(
"Unable to parse search parm session date", ex);
}
}
if (Request[SearchConstants.PARM_EXCHANGETYPE] != null)
ContractSelect.Exchange = Request[
SearchConstants.PARM_EXCHANGETYPE];//.Substring(0, 4); 
else 
ContractSelect.Exchange = "";
//if (Request[SearchConstants.PARM_COMMODITY] != null) 
//{ 
// string strCommodity = Request[SearchConstants.PARM_COMMODITY].ToString(); 
// ContractSelect.Commodity = strCommodity;//.Substring(0, 2); 
 //} 
//else 
// ContractSelect.Commodity = ""; 
if (Request[SearchConstants.PARM_YEAR] != null)
{
try 
{
if (Request[SearchConstants.PARM_YEAR].Length >= 4)
ContractSelect.SetYear = int.Parse(Request[SearchConstants.PARM_CONTRACT_YEAR]);
}
catch (Exception ex)
{ log.Error( "Invalid contract year passed in.", ex);
} }
else 
ContractSelect.SetYear = 0;
if (Request[SearchConstants.PARM_MONTH] != null)
{ try 
{ ContractSelect.SetMonth = 
int.Parse(Request[SearchConstants.PARM_MONTH]);
}
catch (Exception ex)
{log.Error( "Invalid contract month passed in.", ex);
}
}
else 
ContractSelect.SetMonth = 0;
if (Request[SearchConstants.PARM_NUM] != null)
{
string value=Request[SearchConstants.PARM_NUM];
try 
{
hidAccountNum.Value = value;
}
catch (Exception ex)
{cmbAccount.Items.Add(new RadComboBoxItem(value, value));
cmbAccount.SelectedValue = value;
}
}
string str = String.Format("setTimeout(\"{0}.ajaxRequest(\'SEARCH\')\", 250);", RadAjaxManager1.ClientID);
ClientScript.RegisterStartupScript(Page.GetType(),"StartSearch", str, true); }
else 
{
DateTime lastSession = service.GetLastTradeSession();
StartDT.SelectedDate = lastSession;
EndDT.SelectedDate = lastSession;
}
btnExportExcel.OnClientClick = 
string.Format(@"{0}.__doPostBack('{1}', '{2}'); return false;",
RadAjaxManager1.ClientID, btnExportExcel.UniqueID,
btnExportExcel.CommandArgument);
TypeSelect.TradeType = "";
DataBind();   //error is here.  
}

Please let me know if you require anything else to understand the issue.

Thanks,
Tarang

Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Apr 2012
3 answers
75 views
Hi ,

I Recently upgraded my Telerik's DLLs from version  2010.3.1215.40  to  2012.1.215.40  version.
On successful upgrade of the Dll's I found below Properties are missing at the Asp.net Ajax RadGrid 2012.1.215.40 's  'GridSelecting'
class.

AllowCellSelect
AllowColumnSelect
AllowMultiCellSelect
AllowMultiColumnSelect

I would like to know whether these properties are removed intentionally or these provided some where else in the Latest Dll's.

Please comment on this.

Thanks,
Srinivas

 

 

Eyup
Telerik team
 answered on 18 Apr 2012
7 answers
142 views
Hi Dear telerik


when i use RadInput  with right to left text box, i have a bad problem: 
Warning icon is in the right side and this image conflict with text.
for this problem i used  this topic http://www.telerik.com/community/forums/aspnet-ajax/input/input-problem-with-right-to-left.aspx and my problem Solved.

when i Used  RadInput  with left to right text box for Numeric Entry Warning icon is in the left side and this image conflict with text.

i want warning icon is in Left Side and warning text is in right side for both of LTR and RTL

please Help me.

please see attached image : 
Eyup
Telerik team
 answered on 18 Apr 2012
1 answer
33 views
Hi,

In scheduler I'm loading big amount of events information via sqldatasource. And I need only for the user to choose a free slot and hit the button "book it" then he will be redirected to other page.I'm using custom InlineInsertTemplate. The problem is - that when clicking any free slot, all scheduler data gets repopulated it takes about 2-3 seconds to complete. Is it possible to load the data once and and void only InlineInsertTemplate without recreating all the slots? Thanks in advance
Peter
Telerik team
 answered on 18 Apr 2012
2 answers
197 views
Hi,

I have a radgrid whose css is defined in an external stylesheet. I am mainly looking for the height of the radgrid and the width of each of the columns.
The radgrid remains unaffected inspite of the css. I am adding the external style sheet on the server-side in the Page Load like this:
HtmlLink link = new HtmlLink();
                link.Attributes["href"] = "~/Styles/Grids.css";                
                link.Attributes.Add("type", "text/css");
                link.Attributes.Add("rel", "stylesheet");
                Page.Header.Controls.Add(link);

What am I doing wrong?
Pooja
Top achievements
Rank 1
 answered on 18 Apr 2012
6 answers
166 views
Hi.
Im using Version 2010.2.929.40.
Is there any way to get hand on Insert External Video to add as Custom Dialog for the editor ?
Rumen
Telerik team
 answered on 18 Apr 2012
1 answer
88 views
Hi:
I just placed my working chart inside a RadAjaxPanel and the print functionally is giving me a javascript runtime error on the { before the finally.

try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null)

The JScript message says, it may be caused by response.write.

Using _ms As System.IO.MemoryStream = New System.IO.MemoryStream()
    _radChart.Save(_ms, System.Drawing.Imaging.ImageFormat.Png)
    page.Response.Clear()
    page.Response.ClearHeaders()
    page.Response.AddHeader("Content-disposition", "attachment; filename=" & pngName & ".png")
    page.Response.AddHeader("Content-type", "image/png")
    page.Response.BinaryWrite(_ms.ToArray())
    page.Response.End()
End Using
So, there is the response write.  So, how am I supposed to get the PNG image to the users?
Phil
Phil
Top achievements
Rank 2
 answered on 18 Apr 2012
1 answer
157 views
Hy,

The javascript function set_imageUrl() is not working for me if node.get_nodes().get_count() > 0;
For test, i'm only ckeck child node.

The parent node are checking to, and partial text appear, but only the last child are changing image.

function CheckNodeChildren(node, isChecked)
 {
     var nbChildrenNode = node.get_nodes().get_count();
     if (nbChildrenNode > 0)
     {
         for (var i = 0; i < nbChildrenNode; i)
         {
             var childNode = node.get_nodes().getNode(i);
             DetermineMode(childNode, isChecked, false);
             CheckNodeChildren(childNode, isChecked);
         }
         return true;
     }
     else return false;
}
 
function DetermineMode(node, isAllNodeChecked, isSomeNodeChecked)
{
 if (isAllNodeChecked)
 {
     SetMode_TotalAccess(node);
 }
 else if (isSomeNodeChecked)
 {
     SetMode_PartialAccess(node);
 }
 else
 {
     SetMode_ForbiddenAccess(node);
 }
}
         
function SetMode_TotalAccess(node)
{
 node.set_checked(true);
 node.set_imageUrl("/image/checked.gif");
 node.set_text("Total");
// node.set_toolTip(\  TOOLTIP_PictureTotal  \);
}
function SetMode_ForbiddenAccess(node)
{
 node.set_checked(false);
 node.set_imageUrl("/image/deleted.gif");
 node.set_text("Forbidden");
// node.set_toolTip(\  TOOLTIP_PictureForbidden  \);
}
function SetMode_PartialAccess(node)
{
 node.set_checked(false);
 node.set_imageUrl("/image/partial.gif");
 node.set_text("Partial");
// node.set_toolTip(\  TOOLTIP_PicturePartial  \);
}
Vincent
Top achievements
Rank 1
 answered on 18 Apr 2012
1 answer
90 views
Hi;
my chart How do I connect with datatable 
my code but chart item no bound do you speak turkish.
Private Sub ComboDoldur()
        objDt = objLogin.Select("TBLPROJEADI")
        radFirma.DataSource = objDt
        radFirma.DataTextField = "TXTPROJEADI"
        radFirma.DataValueField = "TXTPROJEKOD"
        radFirma.DataBind()
    End Sub
 
    Private Sub ChartDoldur()
        objDt = objLogin.Select("VIEWBOLGELEME", Nothing, "ORDER BY CAGRISAYISI DESC")
        radChart.DataSource = objDt
        radChart.PlotArea.YAxis.AddRange(0, 1, 0.1)
        radChart.Series(0).DataXColumn = "X"
        radChart.Series(0).DataYColumn = "Y"
        radChart.Series(0).Appearance.LabelAppearance.Visible = False
        radChart.DataBind()
    End Sub

Pawar
Top achievements
Rank 1
 answered on 18 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?