Hi,
I thought finding this property would require no thought of my own, but I have not been able to find the setting/property anywhere...
how do you set the text for the "Add New Row" button. Currently, it seems to default to the DATA_MEMBER property.
E.g. Add... USER_ROLE. I would like to be able to set it firstly to a more friendly text description.
thanks heaps. David.
Just a quick follow-up - I believe I found the propperty you need - just set the Hidden property of AddNewBox to False and then set the Prompt property to the actual text you want to see displayed.
Version="4.00" AllowAddNewDefault="Yes" AllowDeleteDefault="Yes" AllowUpdateDefault="Yes"> <FrameStyle Height="200px" Width="325px"> </FrameStyle> <AddNewBox Hidden="False" Prompt="New Prompt"> </AddNewBox> <ActivationObject BorderColor="" BorderWidth=""> </ActivationObject> <AddNewRowDefault Visible="Yes"> </AddNewRowDefault> </DisplayLayout>
I did in the end implement my own add button which works well. The Prompt property of the AddNewBox style settings is for the text before the butto... Eg.
<AddNewBox hidden="False" Prompt="Something random"> </AddNewBox>
would display the following:
Something random [ BUTTON TEXT ]
thanks heaps though for searching...
I did get this to work eventually. It is not very clear in the documentation but this is what you do.
<DisplayLayout ...<AddNewButton Prompt=" " View="Compact"></AddNewButton>...</DisplayLayout><igtbl:ultrawebband addbuttoncaption="Add" AllowAdd="Yes" AllowUpdate="Yes" CellClickAction="Yes"><columns ...</columns></igtbl:ultrawebband>
Not sure why they implemented it this way but it works.
Amy
Here's how you change the prompt and Add New Button caption on the server side. Put this code in the InitializeLayout method of the webgrid
protected void myWebGrid_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e) { // Configure the Add new row of the uwg myWebGrid.DisplayLayout.AddNewBox.Hidden = false; myWebGrid.DisplayLayout.AllowAddNewDefault = Infragistics.WebUI.UltraWebGrid.AllowAddNew.Yes; myWebGrid.DisplayLayout.CellClickActionDefault = Infragistics.WebUI.UltraWebGrid.CellClickAction.Edit; myWebGrid.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes; myWebGrid.DisplayLayout.Bands[0].AddButtonCaption = "Add New Button Text goes here"; myWebGrid.DisplayLayout.AddNewBox.Prompt = "Prompt goes here"; }