iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
We're now using editable grids in a few places. We have a check box column that's part of the data we add, however, the default check box does not blend well with our custom check box in the actual data rows.
We need to replace the default check box in the "Add New Row" row's cell but I can't find how to get that row and set its cell type to a template type and then put in our check box like I do now with our standard data rows.
I've attached a snapshot of what it looks like now.
Hello Yousif,
You can get the object of the new row by using WebGrid1.RootTable.GetNewRow();After that, try to get each cell object and element. Hope this helps.
Regards,Handy
I'm not referring to the new row itself. I'm talking about the row where you add the data, i.e., the input row. Where it typically says "click here to add a new row..." as we'd like to add our custom check box.
Did you look at the image? You can see our check box in the added rows but the standard one in the input row at the top.
Hello,
When you allow add new row in WebGrid, it will show a new row at the top that says "click here to add a new row".As I can see in your images, there is a checkbox. So you would like to remove that checkbox and add your own custom checkbox?If yes, as I suggest before, you would need to get the new row object. Once you obtained the cell element of checkbox, you can hide or remove the checkbox itself. Then add your own custom checkbox.However, I don't understand why do you need this way. If you already embedded your custom checkbox into WebGrid, when you allow add a new row, the checkbox also automatically inserted in your new row.
When you allow add new row in WebGrid, it will show a new row at the top that says "click here to add a new row".As I can see in your images, there is a checkbox. So you would like to remove that checkbox and add your own custom checkbox?If yes, as I suggest before, you would need to get the new row object. Once you obtained the cell element of checkbox, you can hide or remove the checkbox itself. Then add your own custom checkbox.
The answer to your first question is yes. We want the top input row's check box to match our embedded check box that's shown in the actual data rows. So this GetNewRow() will give me the "Add new row" row then. I'll give it a try.
However, I don't understand why do you need this way. If you already embedded your custom checkbox into WebGrid, when you allow add a new row, the checkbox also automatically inserted in your new row.
I don't understand what you're saying here. Are you saying the WebGrid should automatically be using our custom check box? That would be nice, but as you can see it's not. So we'd like to replace that default one with ours to match our UI elements for consistency.
[EDIT] I tried to use this method you mention but it doesn't even exist under the RootTable object, i.e., I get the following standard error
'ISNet.WebUI.WebGrid.WebGridTable' does not contain a definition for 'GetNewRow' and no extension method 'GetNewRow' accepting a first argument of type 'ISNet.WebUI.WebGrid.WebGridTable' could be found (are you missing a using directive or an assembly reference?)
Where does the input row get initialized? I put a breakpoint at OnInitializeRow but it never hit. This event is for content rows only it seems. I also tried OnInitializeCell but also does not break there.
If your Row already has edit type Custom Checkbox, the new row would be the same as default. You can see that in each WebGridColumn, we have NewRowEditType.However, the code I suggested was for clientside (javascript). It seems not possible to do it via server side.
You still haven't answer my questions:
How does NewRowEditType help me modify the check box column in the "Add new row" row's check box cell? We already set it up as this:
this.RootTable.Columns[iColIdx].NewRowEditType = NewRowEditType.SameAsEditType;
Client side doesn't help as we need to modify the cell template like we do for the data row. Similar to what we do now for the normal data row, i.e.,
this.RootTable.Columns[iColIdx].ColumnType = ISNet.WebUI.WebGrid.ColumnType.Template;BooleanTemplate bt = new BooleanTemplate();bt.ColumnName = ColumnName;this.RootTable.Columns[iColIdx].CellTemplate = bt;
If this is not doable because you guys don't provide a way to modify the "add new row" cells then we need this added to the WebGrid. This is very important to us so please send it to development as a high priority item. We can't have our UI looking like this with elements that do not blend in with the rest of our controls because we can't change it.
I would suggest two features of this really:
Thank you.
It's weird. The properties should work as explained. We have a custom editor sample. In New row, If NewRowEditType is same as EditType, it would automatically use the same edit type.So, would you mind to provide a simple sample that replicates this issue?Also, I already aswered your question. Row/Cell would be initialized at event IntializeRow/Cell.But it seems that changing the control in new row, could not be done in server side.It only can be done in javascript.At first, I assumed you were using custom checkbox as your custom editor.With javascript/clientside, I think It is still possible to change it via element.But since you were using template control, I am afraid this could not be done.
I can't provide you with a sample as I can't provide our custom check box control. You should be able to duplicate it by using a third-party check box control in a template column and then enable the AddNewRow feature. That should be simple enough to duplicate.
We can't do this via client-side javascript so we need the new row input to be available to the developer the same way the normal grid data rows are so we can modify them to match the data rows. Please add this as a feature. We really need this soon so whatever you can do to escalate this would be very much appreciated.
And yes, I already know where the row/cell gets initialized. You keep answering my question as if I'm asking about the normal data row which I'm not. The context of this entire thread is regarding the input row at the top that seems inaccessible according to what you've said. So bottom line, we need this feature please. Thanks Handy.
I am sorry for the inconvinience and the trouble regarding your scenario. I already made a simple scenario regarding your request. After discussed with our developer, the scenario still could not be done for template. In this way, I already created a feature request to our developer teams. They would see the possibilities to implement this feature.
Thanks very much Handy. I hope it can be added soon.
Hello Handy,
Has this been added to 2011 R1?
Hi Yousif,
Deeply apologized. This feature has not been enhanced yet. I will ask our developer if it is possible to implemented in our SP1 or not.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname