View Full Version : Ext.NET & Codebehind
plykkegaard
May 16, 2012, 2:05 PM
I have noticed quite a few developers requests samples on to use Ext.NET in codebehind
I have started a series of article on how to accomplish this
http://looksharp.dk/?tag=/ExtNET
Samples are coded for Ext.NET ver 2.0 Beta
hth /Peter
geoffrey.mcgill
May 16, 2012, 8:09 PM
Excellent posts. Thanks for sharing!
geoffrey.mcgill
May 23, 2012, 6:57 PM
Hi Peter,
Do you have a Twitter account, or any other social profile/url/business/service you would like to promote... other than your http://looksharp.dk/ website?
plykkegaard
May 23, 2012, 7:36 PM
Like eg a proper signature? ;-)
- Peter
marcosmejia
May 24, 2012, 8:41 PM
Can you add some controls (buttons command) to the gridpanel in the same codebehind? Or give us some address to see it
Best Regards,
Marcos Mejia.
plykkegaard
May 24, 2012, 9:19 PM
Can you add some controls (buttons command) to the gridpanel in the same codebehind?
Like in a statusbar or toolbar?
It's quite easy, I will see what I can do this weekend
My next examples would have been around generic http handlers and also how to build a dynamic grid based on data layout, I can postpone those
Interesting with the generic approach as this really explains why you want to use code behind
Or give us some address to see it .
Sorry no live preview atm
When more complex examples comes around I need to do something about this part and also let you download full solution except for ext.net, but this belongs to the future ;-)
rgds /Peter
plykkegaard
May 25, 2012, 1:28 PM
Like in a statusbar or toolbar?
Quite forgot, you can add buttons to the gridpanel
Eg
Buttons = {
new ext.Button()
{
Text = "Refresh",
Icon = ext.Icon.ArrowRefresh,
OnClientClick = "#{store}.load();"
}
}
rgds
marcosmejia
May 26, 2012, 12:58 AM
Dear Peter!
I think I have more control of programming from the code behind.
I think Geoffrey should focus on MVC 3 or 4, and drive users in that way. It is a comfortable way to communicate Client Side and Server Side.
If you were to choose one of 4 methods for CRUD program which are in the example2/gridpanel/SavingVariation: HttpHandler, Web Services, StoreEvent or StoreCustumLogic, Which Do you prefer? What is more easy?
Best Regards,
Marcos Mejia
plykkegaard
May 26, 2012, 6:20 AM
Currently I am using store events when saving data but httphandlers to retrieve
Our main app coded using ext.net is from 09, it's more historic reasons than anything else
Down the road I have changed all data load to use httphandlers
I started to change all my combos is I have quite a few in my gridpanel
I have been looking at webservices but cross site it's difficult to handle as you need to use special query string and httpmodules
http://forums.ext.net/showthread.php?17352-JSONP-and-Webservices-versus-Generic-Handlers
As you said MFC/MVC is so much easier eg JSONP is supported out of the box
rgds
plykkegaard
May 26, 2012, 6:24 AM
I think Geoffrey should focus on MVC 3 or 4, and drive users in that way.
If you haven't done any apps in MVC and also first timer with Ext.Net you're in for a ball
Imo it's a steep learning curve for both ;-)
rgds
marcosmejia
May 26, 2012, 11:59 PM
I need an example using saving data in httphandler. Because de example CRUD in the Example2.Ext.Net is not working, specific when I delete a row I click save. That is in Ext.Net 2.
Best Regards Peters.
Marcos Mejia.
plykkegaard
May 27, 2012, 6:38 AM
Please create a new thread and describe what you have done and which error is thrown to keep the forum clean and tidy and easy for any user to search and browse - thanks
Is it CRUD grid example you have problems with?
https://examples2.ext.net/#/GridPanel/Saving_Variations/HttpHandler/
This is the example I am converting to use code behind atm
I have some issues with the LINQ to SQL as this is a new to me but otherwise it's just a matter of a search and replace
The code will be broken up ind small functions to demonstrate the power of code behind
rgds
plykkegaard
May 27, 2012, 1:55 PM
Can you add some controls (buttons command) to the gridpanel in the same codebehind?
I have created a copy of this example
https://examples2.ext.net/#/GridPanel/Saving_Variations/HttpHandler/
Code behind version
http://looksharp.dk/post/2012/05/27/Create-ExtNET-CRUD-in-code-behind.aspx
hth /Peter
marcosmejia
May 30, 2012, 5:31 AM
Dear Peter!!!
I prove the example CRUD HttpHandler from code behind . Everything is very well. Certainly thanks. Just as you explain a minor trouble with the StoreResponseData.
when I delete a row
it say {data:"", total: 0} Status code : 200, Status Text: ok in the Request Failure Dialog Box.
I willl try to find the problem. In all case this is a straight step.
Best Regards,
Marcos Mejia.
paulinogreis
Jul 31, 2012, 12:57 PM
Hi Peter,
in code behind dont exist the dataIndex property of textField, how to save in store ?
Buttons = {
new ext.Button()
{
Text = "Refresh",
Icon = ext.Icon.ArrowRefresh,
OnClientClick = "#{store}.load();"
}
}
plykkegaard
Jul 31, 2012, 1:34 PM
in code behind dont exist the dataIndex property of textField
The dataindex property is hidden, you need to do a workaround like eg my buildcolumn method
And it's not a property on the textfield object (editor) but the column object
how to save in store
store.sync takes care of it and calls the generic handler SuppliersSave
When you have the CRUD Grid Example (https://examples2.ext.net/#/GridPanel/Saving_Variations/HttpHandler/) up and running you can use my example instead of the markup code
hth /Peter
paulinogreis
Jul 31, 2012, 2:03 PM
Ok, but i am using formPanel
Hi Peter,
in code behind dont exist the dataIndex property of textField, how to save in store ?
Buttons = {
new ext.Button()
{
Text = "Refresh",
Icon = ext.Icon.ArrowRefresh,
OnClientClick = "#{store}.load();"
}
}
plykkegaard
Jul 31, 2012, 3:03 PM
Ok, but i am using formPanel
Please create a new thread in the appropriate forum including a sample to reproduce/work with
Thanks /Peter
Powered by vBulletin® Version 4.2.3 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.