Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
60 views
HI,

Ok, with some help i got to this point but found out on postback for some reason it alwyas registers my check event as as false and then i get an error in the datasource event, how can I check for it the cb_checkchanged event is true or false for checked or not in the event so that I can set the value of my hidden field to load the grid properly.

Protected Sub myRadGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemCreated
      If TypeOf e.Item Is GridCommandItem Then
          Dim citem As GridCommandItem = DirectCast(e.Item, GridCommandItem)
          Dim Cb As CheckBox = DirectCast(citem.FindControl("cbhist"), CheckBox)
          If Cb.Checked = True Then
              HFHist.Value = 1
              AddHandler Cb.CheckedChanged, AddressOf cb_CheckedChanged
          Else
              HFHist.Value = Nothing
              AddHandler Cb.CheckedChanged, AddressOf cb_CheckedChanged
          End If
      End If
  End Sub
  Private Sub cb_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
      myRadGrid.Rebind()
  End Sub

Protected Sub myRadGrid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles myRadGrid.NeedDataSource
      Dim sqlwhere As String
      If Int32.Parse(HFHist.Value) = 1 Then
          sqlwhere = ""
      Else
          sqlwhere = "where bitJ6 IS NULL or bitJ6 = 0"
      End If
      sql = "Select f.intFlagId, f.intPersonnelid, mn.strFullname + ' ' + mn.strRank Flag, m.strFullname + ' ' + m.strRank FlagBy, CONVERT(varchar(10), dtFlagged, 101) dtFlagged, bitUnit, bitJ2, bitJ6, strNotes " _
          & "from iMAC_J2Flag f INNER JOIN MnNgPersonnel.dbo.tblMNNatPersonnel mn on mn.intPersonnelId = f.intPersonnelId INNER JOIN MnNgPersonnel.dbo.tblMNNatPersonnel m on m.intPersonnelId = f.intFlagBy " _
          & "" & sqlwhere & ""
      Response.Write(sql)
      Response.End()
      myRadGrid.DataSource = getData(sql)
  End Sub

Radoslav
Telerik team
 answered on 24 Jul 2012
4 answers
292 views
Team,

I have a scenario to ask for confirmation before proceeding the logic. I need to call the confirm in TextBox Changed Event at code-behind (C#).

CS
RadAjaxManager1.ResponseScripts.Add("radconfirm('Are you sure!?', confirmCallBackFn);");

How can i get the result value if I press Yes or No, need some sample script.

Mohan
Top achievements
Rank 1
 answered on 24 Jul 2012
2 answers
64 views
I need to have 2 refresh button in the Radgrid.On clicking one Refresh button I need to show a set of data in the grid and on clicking the other refresh button,need to show another set of data.
How can I accomplish this by giving 2 refresh buttons in the radGrid.?

Also ,in the Grid,I have given filter with below properties in one of my column 'Name'.
"AutoPostBackOnFilter="true" ShowFilterIcon="false" CurrentFilterFunction="Contains""
If I enter a name and press enter,records with given name is fetched.But if I remove the name and click on refresh button,the grid is not refreshed with whole data.It is showing the 1 record with that name itself.Can I refresh the Grid as in normal case/

Please help me on the above two issues.
Thanks,
Soumya.


Radoslav
Telerik team
 answered on 24 Jul 2012
3 answers
1.7K+ views
Hi there..

Normally we have English letter keyboards with other languages support. And we can switch between languages by pressing Alt-Shift or Ctrl-Shift, or by selecting the input language from the language bar, and then we can start typing in the selected language.

Currently I am developing a web page where the user should fill some fields in two languages (i.e., filling name in English letters and then filling name in Arabic letters). Normally in this case, the user should fill the name in English and then switch the keyboard language from the keyboard or the language bar.


I want to restrict the input the Arabic text box to accept only Arabic , put also you can pest arabic word,,
I am using ASP.NET AJAX Q1 2012 ..

is there any way in Rad Control to do that?

Thanks..
Eyup
Telerik team
 answered on 24 Jul 2012
3 answers
111 views
hi Everybody,
I am exporting radgrid into pdf. But on the same time, I want to add an jpg image into same pdf, by converting into bytes. In debugging it is showing all total bytes into newarr, and even it adds same total kbs into resultset pdf file, but it does not show that additional image into result pdf file. Please do help me.

MemoryStream chartStream;// it contain image in chartStream on button click and after button click execute RadGrid1_GridExporting.
protected void RadGrid1_GridExporting(object source, GridExportingArgs e)
        {
            using (FileStream fs = File.Create(FILEPATH))
            {
                byte[] chartbytes = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
                byte[] imagebytes = chartStream.ToArray();
                byte[] newarr;
                newarr = chartbytes.Concat(imagebytes).ToArray();
                fs.Write(newarr, 0, newarr.Length);
            }
        }
Daniel
Telerik team
 answered on 24 Jul 2012
7 answers
1.1K+ views
I've been getting this error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control" on all of my combos since I upgraded to Q1 2010 version, is there any reason for that?
 
Nicolaï
Top achievements
Rank 2
 answered on 24 Jul 2012
3 answers
111 views
Hi Telerik,
When I resize the tree pane width, grid of file explorer auto resize (file attachment).
Please help me fix bugs, thanks you so much.

This code :
<telerik:RadFileExplorer runat="server" ID="FileExplorer1" Configuration-MaxUploadFileSize="100000000" OnItemCommand="FileExplorer1_ItemCommand"
    VisibleControls="Toolbar,ContextMenus,TreeView,Grid" Width="520px" Height="520px"
    EnableCreateNewFolder="true" EnableOpenFile="true">
</telerik:RadFileExplorer>

Rohan
Top achievements
Rank 1
 answered on 24 Jul 2012
0 answers
50 views
hello.. i am using RadAsyncUpload to upload my client files i want 2 check if the current uploaded file size is larger then the maximum allowed file size i want 2 display my validation label without making that file appear in the progress area like appearing in the second image
Bassem
Top achievements
Rank 1
 asked on 24 Jul 2012
2 answers
48 views
Hi everybody!
I have a problem about edit in radgrid. I do example http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editmodes/defaultcs.aspx#  When I click update, data in grid is changed but grid is not normal (editmode of this row is inplace). Although, when I click cancel, grid is normal (this row is normal).
Have you any idea! Thanks you!
Pham
Top achievements
Rank 1
 answered on 24 Jul 2012
1 answer
105 views
I have a custom control "toolbar" my page and I have created a confirm dialog for one of the toolbar button. I need to hook-up some server side code from the javascript. Is is possible with telerik toolbar ? Thanks in advance. 
Princy
Top achievements
Rank 2
 answered on 24 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?